Click here to Skip to main content
11,431,844 members (63,801 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript
I have the following javascript which works fine in Mozilla but not working in Chrome or IE
function TimeCheck() {        
         var Date1 = new Date(StartTime.get_selectedDate())       
         var date2 = new Date(Date1);
         var date3=date2.setMinutes(date2.getMinutes() + 30);
         var Endtime = new Date(date3);
           document.getElementById('ctl02_ViewEventsOnCalendar1_SchedulerControl_Form_EditEventControl_EndTime_dateInput_display').innerHTML = Endtime.format("M/d/yyyy h:mm tt");
document.getElementById('hfEndTime').value = Endtime.format("M/d/yyyy h:mm tt");

And using the following code in aspx on Telerik RadeDateTimePicker onchange event
<telerik:RadDateTimePicker ID="StartTime"  runat="server" Skin="Office2007" TimeView-EndTime="22:00:00" 
                    TimeView-Interval="00:30:00" TimeView-StartTime="07:00:00" AutoPostBackControl="None"  onchange="javascript:TimeCheck();"
                    <TimePopupButton ImageUrl="" HoverImageUrl="" ></TimePopupButton>
                    <TimeView CellSpacing="-1" Culture="English (United Kingdom)"  önClientTimeSelected="OnClientTimeSelected"  >
                    <DateInput AutoPostBack="false" >
                        <ClientEvents OnLoad="onLoadRadTimePicker1"  önValueChanged="validateBackdate" />
                    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" 
                    <DatePopupButton ImageUrl="" HoverImageUrl="" ></DatePopupButton>
Posted 15-Jan-13 22:56pm
Abhishek Pant at 16-Jan-13 4:19am
I think that javascipt is not enabled in your browser- IE or chrome
check it-How to enable JavaScript in your browser[^]
Tirthankar Dutta at 16-Jan-13 4:45am
No..its enabled..
Soroush Falahati at 20-Jan-13 15:23pm
Check for Javascript errors and let us know it. Then we can help:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150428.2 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100