LoginSignup
0
0

More than 5 years have passed since last update.

ASP.NETのカレンダーコントロールで日付未選択の状態を判定

Posted at

ASP.NETのカレンダーコントロールで日付が未選択かを判定するときは、NULLで判定すればよいと思いますが、NULL判定だと上手くいきません。

判定方法

未選択の場合はDateTimeの初期値が設定されているので、以下のように判定。
if (Calendar1.SelectedDate.Date == DateTime.MinValue) {}

参考

Calendar コントロール-msdn
Calendar.SelectedDate - Is selected?-ASP.NET Forums

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0