Cancellation in DatePicker

4 posts, 2 answers
  1. Alex
    Alex avatar
    21 posts
    Member since:
    Apr 2012

    Posted 06 Aug 2012 Link to this post

    Hello.

    How can I check that user not choosed date and clicked cancel button in RadDatePicker? Maybe there is some sort of events?

    Thanks.
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 07 Aug 2012 Link to this post

    Hello Alex,

    You can use the ValueChanged event. When the OK button in RadDatePicker is tapped the event is fired and when the Cancel button is tapped the event is not fired.

    Kind regards,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Alex
    Alex avatar
    21 posts
    Member since:
    Apr 2012

    Posted 07 Aug 2012 Link to this post

    Thanks. But I think that I can't use only ValueChanged event. I think that  to solve the problem it must be used in combination with PopupOpened and PopupClosed.
  5. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 08 Aug 2012 Link to this post

    Hello Alex,

    Yes, for your scenario the ValueChanged event won't suffice. You will need the PopupClosed event as well. You can have a flag isValueChanged set to false and change it when ValueChanged occurs. Then on PopupClosed you will know if the value has been changed or not and reset the flag.

    Regards,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top