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

DatePicker Binding Issue.

2 Answers 92 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
shalabh
Top achievements
Rank 1
shalabh asked on 04 Mar 2011, 09:32 AM
hello,

I have used MVVM approch to bind datepicker with entity. Below given is the code which i used to bind DatePicker:

<

 

 

telerikInput:RadDatePicker x:Name="DateofReferral" TabIndex="1" SelectedValue="{Binding memberIncomingReferral.ReferralDate, Mode=TwoWay}" Culture="en-US" Height="22"/>

By default i set "TodayDate" in this control when loading the form. now if i click on control and blank it by BackSpace and save the screen, still i get "TodayDate" in my entity.
DatePicker doesn't set value Null or blank if i clear it by using backspace. It doesn't refect value Null back to my ViewModel. It only change value when i select any other date from Canlendar.

please suggest.

 

2 Answers, 1 is accepted

Sort by
0
Hrushikesh
Top achievements
Rank 1
answered on 06 Mar 2011, 01:59 PM
@Telerik,

You people can verify this in your firstlook for the silverlight datettimepicker.

http://demos.telerik.com/silverlight/default.aspx#DateTimePicker/FirstLook

This is so much urgent. Please have a look and reply if any other way to do it.

Thank you
Hrushikesh
0
Kaloyan
Telerik team
answered on 07 Mar 2011, 09:50 AM
Hi Hrushikesh,

The binding is propagated through the ViewModel when lost focus appears. This means that you have to update the binding expression when you are  saving the screen.

Regards,
Kaloyan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
DatePicker
Asked by
shalabh
Top achievements
Rank 1
Answers by
Hrushikesh
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or