This is a migrated thread and some comments may be shown as answers.

DatePicker shows incorrect values when the date value is something like '30/10/2010 12:00:00 AM'

1 Answer 213 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Manmeet
Top achievements
Rank 1
Manmeet asked on 01 Oct 2010, 07:13 AM
Hi Telerik Team,

I got a problem with datepicker. I used date picker as you used in Advanced edit/insert template (Advanced Edit/Insert template).

Problem occurred when i try to open any activity in edit mode and activity end date is some thing like "10/30/2010 12:00:00 AM" and start date "10/29/2010 12:00:00 AM". In this case it opens edit form with end date "10/29/2010" and start date "10/29/2010". In calender tag i set DayStartTime="00:00:00" DayEndTime="23:59:59".

here is the code:
<ul class="rsTimePickers">
    <li class="rsTimePick">
        <label for='<%= StartDate.ClientID %>_dateInput_text'>
            <%= Owner.Localization.AdvancedFrom +":" %></label><%--
         Leaving a newline here will affect the layout, so we use a comment instead.
        --%><telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker"
            Width="83px" Culture='<%# Owner.Culture %>' Skin="Office2007" MinDate="1900-01-01">
            <DatePopupButton Visible="False" />
            <DateInput ID="DateInput1" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
        </telerik:RadDatePicker>
        <%--
         
        --%><telerik:RadTimePicker runat="server" Width="70px" ID="StartTime" CssClass="rsAdvTimePicker"
            Culture='<%# Owner.Culture %>' Skin="Office2007" On>
            <DateInput ID="DateInput2" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
            <TimePopupButton Visible="false" />
            <TimeView ID="TimeView1" runat="server" Columns="4" ShowHeader="false" Interval="00:30" />
        </telerik:RadTimePicker>
    </li>
    <li class="rsTimePick">
        <label for='<%= EndDate.ClientID %>_dateInput_text'>
            <%= Owner.Localization.AdvancedTo +":"%></label><%--
         
        --%><telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker"
            Width="83px" Culture='<%# Owner.Culture %>' MinDate="1900-01-01" Skin="Office2007">
            <DatePopupButton Visible="False" />
            <DateInput ID="DateInput3" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
        </telerik:RadDatePicker>
        <%--
         
        --%><telerik:RadTimePicker runat="server" Width="70px" ID="EndTime" CssClass="rsAdvTimePicker"
            Culture='<%# Owner.Culture %>' Skin="Office2007" On>
            <DateInput ID="DateInput4" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " />
            <TimePopupButton Visible="false" />
            <TimeView ID="TimeView2" runat="server" Columns="4" ShowHeader="false" Interval="00:30" />
        </telerik:RadTimePicker>
    </li>
    <li class="rsAllDayWrapper" style="display: none;">
        <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
    </li>
</ul>


Please help me to resolve this issue.

Regards
Manmeet Singh

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 01 Oct 2010, 07:41 AM
Hello Manmeet,

Please refer to the following forum post for an explanation of the problem:

http://www.telerik.com/community/forums/aspnet-ajax/calendar/problem-with-raddatepicker-control-cannot-select-01-10-2009.aspx#979327

Since a good and universally applicable workaround is not available, you can check the datepicker's selected date (Javascript date object) and if its time part is 23:00, modify it to set the correct date.

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Calendar
Asked by
Manmeet
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or