- Home
- Forum
- ASP.NET Core
- How to keep the same time selected in the appointment editor window
How to keep the same time selected in the appointment editor window
Hi Support:
When I create a new appointment for example: Start Time 3:00 PM and then press the DONE button, the action controller shows 8:00 PM in the EditParams.
In the ej-schedule, I added a time-zone="UTC -5:00"
What we can do to keep the same time that the user enters in the window. We also want to hide the time zone fields to have a very simple entry dialog.
Is there is a simple way to deal with this. Definately we expect to have users in different time zones.
Thanks in advanced
Happy Holidays
David
SIGN IN To post a reply.
3 Replies
SE
Sellakumar
Syncfusion Team
December 27, 2016 04:01 PM UTC
Hi David,
Thanks for contacting Syncfusion support.
To maintain the same time on which the user enters in the appointment window, you can disable the process of adding time offset difference to the appointment time by setting applyTimeOffset property to false. Also, to hide the time-zone fields in the appointment window, set the showTimeZoneFields property to false.
The usage of those 2 properties have been depicted in the below demo sample in jsplayground link for reference:
Please refer the below API description link in JS for further reference:
applyTimeOffset: https://help.syncfusion.com/api/js/ejschedule#members:appointmentsettings-applytimeoffset
Kindly revert us, if you need any further assistance on this.
Regards,
Sellakumar K
DS
dsapo
December 27, 2016 07:16 PM UTC
Hi Sellakumar:
I have this code in my ASP.NET Core view:
<ej-schedule id="Schedule1" width="100z%" height="525px" show-quick-window="false" current-date="DateTime.Now"
show-time-zone-fields="false"
create="onCreate" appointment-window-open="onAppointmentOpen">
<e-appointment-settings id="Id" subject='"Subject"' start-time='"StartTime"' end-time='"EndTime"'
apply-time-offset="false"
all-day='"AllDay"' recurrence='"Recurrence"' recurrence-rule='"RecurrenceRule"'>
<e-datamanager url="Home/GetData" crud-url="Home/Batch" adaptor="UrlAdaptor"></e-datamanager>
</e-appointment-settings>
</ej-schedule>
But when the new appointment is posted to the action method, the time changes with an offset of UTC +5
Also I tested with assignning the property with jquery and I get the same result.
What else could I try.
Appreciate all your help.
David
SE
Sellakumar
Syncfusion Team
December 28, 2016 04:13 PM UTC
Hi David,
Thanks for your update.
We suspect that the difference could be due to the different timezone maintained with the client and server machine. Therefore, we suggest you to bind the startTimeZone and endTimeZone fields for the appointments as depicted below -
Kindly refer the below code snippet:
<code>
<ej-schedule id="Schedule1" width="100z%" height="525px" show-quick-window="false" current-date="DateTime.Now" show-time-zone-fields="false" time-zone=”UTC -05:00”
create="onCreate" appointment-window-open="onAppointmentOpen">
<e-appointment-settings id="Id" subject='"Subject"' start-time='"StartTime"' end-time='"EndTime"' apply-time-offset="false" all-day='"AllDay"' recurrence='"Recurrence"' recurrence-rule='"RecurrenceRule"'
start-time-zone=’”StartTimeZone”’ end-time-zone=’”EndTimeZone”’>
<e-datamanager url="Home/GetData" crud-url="Home/Batch" adaptor="UrlAdaptor"></e-datamanager>
</e-appointment-settings>
</ej-schedule>
</code>
Also for your reference, kindly check with the following link for its working: http://jsplayground.syncfusion.com/av4rvki1
UG Document links for those API description in JS:
StartTimeZone: https://help.syncfusion.com/api/js/ejschedule#members:appointmentsettings-starttimezone
Kindly try the above solution and revert us, if you need any further assistance on this.
Regards,
Sellakumar K
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
DS dsapo
- Dec 24, 2016 12:58 AM UTC
- Dec 28, 2016 04:13 PM UTC