We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to keep the same time selected in the appointment editor window

Thread ID:

Created:

Updated:

Platform:

Replies:

128005 Dec 24,2016 12:58 AM UTC Dec 28,2016 04:13 PM UTC ASP.NET Core 3
loading
Tags: Schedule
dsapo
Asked On December 24, 2016 12:58 AM UTC

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

Sellakumar [Syncfusion]
Replied On 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: 
  
Kindly revert us, if you need any further assistance on this. 
  
Regards, 
Sellakumar K

dsapo
Replied On 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


Sellakumar [Syncfusion]
Replied On 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 
 
  
Kindly try the above solution and revert us, if you need any further assistance on this. 
  
Regards, 
Sellakumar K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;