2 DateTimePicker and NullDate Problem

6 posts, 0 answers
  1. NorthGates
    NorthGates avatar
    13 posts
    Member since:
    Oct 2012

    Posted 09 Feb 2013 Link to this post

    I use 2 DateTimePicker, one for FromDate and one for ToDate.

    I like the idea of displaying null text ie: 'From Begining' and 'To End' but my problem is that for some reason whatever I set NullDate for the ToDate, it returns MinDate value.

    How can I make it choose the MaxDate when using SetToNullValue. I tried many variations but alas.

    PS.: I have one DatePicker on a UserControl and have 2 copies of the user control on a form and I added properties to the usercontrol to set date.value, MinDate, MaxDate, NullText, NullDate, SetToNullValue..
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 Feb 2013 Link to this post

    Hi Luc,

    We recommend using the NullableValue property in this scenario. Its type is nullable and it will allow you to check for null values. Please note that you cannot set the Value of RadDateTimePicker to MaxDate.

    If this does not help, please describe in detail what exactly you want to achieve. This will help us to provide you with a proper solution.

    If you have other questions, do not hesitate to contact us.

    All the best,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Eddie
    Eddie avatar
    6 posts
    Member since:
    Mar 2011

    Posted 25 Jun 2013 Link to this post

    Where do you get NullableValue?
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 28 Jun 2013 Link to this post

    Hi Eddie,

    NullableValue is a property of RadDateTimePicker control introduced to support null as value of the control without introducing breaking changes.

    I hope this helps.
     

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. tom
    tom avatar
    4 posts
    Member since:
    Aug 2008

    Posted 11 Jul 2013 Link to this post

    Do you have any vb examples of how to implement this nullvalue,

    if I have a date field that doesn't always require a date, so I need the display to not show a date until they select one. I like the idea of  showing "Enter SOLD Date" or whetever  until they select a date but cannot get that to work. I keep getting min date displayed, so id like an example in vb.net if possible

    thanks!

    Tom

  7. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 16 Jul 2013 Link to this post

    Here you are Tom:
    radDateTimePicker1.NullText = "Enter SOLD Date"
    radDateTimePicker1.NullableValue = Nothing

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready