RadTimePicker, "bug" in mindate validation??

3 posts, 0 answers
  1. Javi
    Javi avatar
    6 posts
    Member since:
    Oct 2012

    Posted 04 Dec 2012 Link to this post

    Hi, I'm using RadTimePicker (really i'm using DnnTimePicker, but it's the same)  in my dotnetnuke proyect.
    RadTimePicker works fine, but i found a little problem.
    I have the proyect in a server, if I set the mindate value for example to today at 11:00, then the  RadTimePicker mindate value is "4/12/2012 11:00". This "today" uses the server date.

    Ok, its ok, if I open the solution in a client machine with the same date, all works fine, i can't select any hours before mindate.

    But i think that mindate validation uses client machine "today" for compare with RadTimePicker mindate. Then if client machine has a different date, for example, 5/12/2012, if I select for example 10:00, mindate validation will compare mindate (4/12/2012 11:00) and selected date (5/12/2012 10:00) and like

    4/12/2012 11:00 < 5/12/2012 10:00

    I will can select this hour.

    I'm not sure that this, because, If client machine has a previous date to server machine date (for example 3/12/2012), in my theory, if i select 12:00, "mindate validation" will compare:

    4/12/2012 11:00 < 3/12/2012 12:00

    but this doesn't happen, it's like only compares 11:00 < 12:00 and permits to select this.

    I don't understand how works this validation, but one thing is sure:

    - Client machine with the same o previous date that server machine: all works ok.
    - Client machine with a bigger date: this don't work.


    I hope that you can help me :)

    Thanks, regards, Javi.

    PD: sorry for my english
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 07 Dec 2012 Link to this post

    Hello Javi,

    RadTimePicker uses the server date for its validations. As you already know it stores a DateTime object in its structure.  When using validation the value selected should have the date from the server and not the date from the client machine. Note that you are using DnnTimePicker and the implementation of the control may be different.
     
    Regards,
    Angel Petrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Javi
    Javi avatar
    6 posts
    Member since:
    Oct 2012

    Posted 10 Dec 2012 Link to this post

    Ok, thanks. I supposed this, because I was testing a lot of time using my local machine as server, and all was ok.
    Then I moved the proyect to server, and all looked ok, no problems, but casually I tried the portal from a client machine with another date, and I found this problem.
    I will be studing this, and while I find some solution, I will use another validation when the user push "save".

    Thanks, best regards, Javi.
Back to Top