timeview wont select in datetime picker

2 posts, 0 answers
  1. Andrew Knowles
    Andrew Knowles avatar
    42 posts
    Member since:
    Aug 2006

    Posted 22 Jul 2008 Link to this post

    When trying to select a time using timeview i click the time button which displays the different time options when i make a selection it removes the time which was in the timepicker box and replaces it with nothing also the timeview stays on the page, I am unable to make a time selection without manually putting it in the box, here is the aspx code i am using:

    <radCln:RadDateTimePicker ID="ClockOutDTP" style="position:absolute; top:26px; left:150px" runat="server" AutoPostBackControl="TimeView"

    OnSelectedDateChanged="ClockOutDTP_SelectedDateChanged" Enabled="False" DateInput-DisplayDateFormat="dd/MM/yyyy hh:mm" DateInput-Culture="En-GB"

    DateInput-DateFormat="dd/MM/yyyy" TimeView-Enabled="true" TimePopupButton-Enabled="true">

    <TimeView Culture="En-GB" Skin="" Style="display: none;" runat="server">

    </TimeView>

    <DateInput Skin="" AutoPostBack="True">

    </DateInput>

    </radCln:RadDateTimePicker>

    i am using caldndar dll version 2.2.5.0
    can you advise if there is something I have done wrong here, when you reply can you please copy in joe.pinder@xcl.co.uk thanks!

  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 23 Jul 2008 Link to this post

    Hi Andrew,

    I already answered your support ticket. Anyway, for the convenience of our community I post the answer here.

    The problem is caused by this property - DateInput-DateFormat="dd/MM/yyyy". Obviously there is no time in the selected date format string and thus the time is not parsed. DateInput-DisplayDateFormat="dd/MM/yyyy hh:mm" doesn't work in this case because there is no time to format.
    The solution is simple - add time to your DateInput-DateFormat as shown below:

    DateInput-DateFormat="dd/MM/yyyy hh:mm"

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top