jQWidgets Forums
Forum Replies Created
-
Author
-
November 14, 2016 at 7:50 pm in reply to: New all Day Appointment Disappears and only reappear when page is refreshed. New all Day Appointment Disappears and only reappear when page is refreshed. #89050
Will it not work if I create an ALL DAY appointment with a time component.
For example:
start: 2016-11-16T03:30:00.000Z
end : 2016-11-16T03:30:00.000Zshould my ALL DAY appointment look like this:
start :2016-11-16
end : 2016-11-16November 14, 2016 at 3:47 pm in reply to: New all Day Appointment Disappears and only reappear when page is refreshed. New all Day Appointment Disappears and only reappear when page is refreshed. #89042I am manipulating my dates as such…
if (serverAppointment.IsAllDay) {
serverAppointment.StartDate = new Date(jsAppointment.from.year(),
jsAppointment.from.month() – 1,
jsAppointment.from.day(),
00,
00,
00);
serverAppointment.EndDate = new Date(jsAppointment.to.year(),
jsAppointment.to.month() – 1,
jsAppointment.to.day(),
00,
00,
00);
}then I send both the start date and end date to the server by converting them to ISO format like this:
//apply timezone
serverAppointment.StartDate = new Date(serverAppointment.StartDate.getTime() + ((timeZoneOffset * -1) -serverAppointment.StartDate.getTimezoneOffset()) * 60000); //where timeZoneOffset is -210
serverAppointment.EndDate = new Date(serverAppointment.EndDate.getTime() + ((timeZoneOffset * -1) – serverAppointment.EndDate.getTimezoneOffset()) * 60000); //where timeZoneOffset is -210
// convert to ISO
serverAppointment.StartDate = serverAppointment.StartDate.toISOString(); // this results in “2016-11-16T03:30:00.000Z”
serverAppointment.EndDate = serverAppointment.EndDate.toISOString(); // this results in “2016-11-16T03:30:00.000Z”Thanks.
Harrobbed
-
AuthorPosts