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

3 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 08 Jan 2009 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Jan 2009 Link to this post

    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

  3. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 09 Jan 2009 Link to this post

    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
Back to Top