RadDatePicker: Issue with SelectedDate in Calendar and DateInput

1 Answer 72 Views
Calendar DateInput DatePicker Input
Jens
Top achievements
Rank 1
Jens asked on 02 Dec 2021, 07:28 AM
Hello,
i have a webform with 4 RadDatePickers. In one control i want to have two different dates.  In the dateInput-control is a date from a database and in the calender-control should be now.
The code look like this:

If IsNothing(Sfo.DatumletztPrüfung) = False AndAlso IsDate(Sfo.DatumletztPrüfung) = True Then
            RadDateLetztePrüfung.DateInput.SelectedDate = Convert.ToDateTime(Sfo.DatumletztPrüfung)
            RadDateLetztePrüfung.Calendar.SelectedDate = Now()
End If

But the controls are empty. Only when is set the date to the RadDatePicker-Control:
 RadDateLetztePrüfung.SelectedDate = Convert.ToDateTime(Sfo.DatumletztPrüfung)
The Date is shown.
What have i made wrong?

Kind regards
Jens

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 07 Dec 2021, 07:05 AM

Hi Jens,

The RadDatePicker is a composite control combining a DateInput and a Calendar which makes selecting a date possible in both ways - by typing it and by picking a date in the Calendar. Yet, the RadDatePicker is designed to process a single date selection, and having different dates selected in the DataInput and in the Calendar is not possible.

Instead, you may consider using stand-alone RadDateInput and RadCalendar controls which can hold their own different dates.

I hope you will find this information helpful.

Please let me know if any questions come up.

Kind regards,
Doncho
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

jacky
Top achievements
Rank 1
commented on 07 Dec 2021, 02:40 PM

Thanks for the awesome information.
Tags
Calendar DateInput DatePicker Input
Asked by
Jens
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or