This is a migrated thread and some comments may be shown as answers.

HasValue property or equivalent for RadCalendar.SelectedDate

1 Answer 111 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kirk Thomas
Top achievements
Rank 1
Kirk Thomas asked on 10 Sep 2009, 03:38 PM
Hello,

I was wondering if there is a HasValue type of property for the radCalendar.

The way my code right now looks like this.

DateTime date = RadCalendar1.SelectedDate;

I would like to have something like this

DateTime date = RadCalendar1.SelectedDate.HasValue;

but there is no HasValue property or any other property like it as far as I can tell.

Thanks for the help in advance,
Kirk

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 11 Sep 2009, 08:26 PM
Hello Kirk,

The RadCalendarControl's SelectedDate property returns a DateTime object. This object does not provide property such as HasValue hence the SelectedDate does not provide it either. You can just check if SelectedDate != "null" which will ensure whether SlectedDate has a value or not.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar
Asked by
Kirk Thomas
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or