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

DatePicker and TimePicker Can Determine when Value changes or block null values?

2 Answers 71 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 08 Jan 2009, 03:46 PM
Hello,

Is there a way to block null values for the date/time pickers, or is there an event that fires whenever the value in the textbox becomes null?  I want to ensure a value always exists...  I would like to know when the user enters a null value, which dateselected client-side event doesn't fire.  DateInput.OnClientDateChanged event didn't fire either.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Jan 2009, 11:07 AM
Hi Brian,

Try using a RequiredFieldValidator for achieving desired scenario.

ASPX:
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"
                </telerik:RadDatePicker> 
<asp:RequiredFieldValidator runat="server" ID="validator1" ControlToValidate="RadDatePicker1" 
ErrorMessage="enter a date!"></asp:RequiredFieldValidator> 

Shinu

0
Brian Mains
Top achievements
Rank 1
answered on 09 Jan 2009, 02:17 PM
Hello,

Actually, I'm looking at it more so that I can read and react to that change, that I can fill in a date.  Yes, that's good that the RFV works, but I want to be able to handle this via a client-side event and not the RFV.  So I guess it's not possible, and I would like this to be a future suggestion.

Brian
Tags
Calendar
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Brian Mains
Top achievements
Rank 1
Share this question
or