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. Image for the cookie policy date

How to set to false the time-zone

How can I set to false the timeZone property via javascript not via tag helper, something like:

Tag-Helper:

<ej-date-picker id="startDate" value="DateTime.Now" time-zone="false"></ej-date-picker>

Javascript ?
$("#date").ejDatePicker({
timeZone: false  // I just tried to guess :)
});

2 Replies

DL Deepa Loganathan Syncfusion Team December 21, 2018 06:07 PM UTC

Hi Eduardo,  
 
Thanks for contacting Syncfusion support.  
 
The Timezone API of Datepicker is used to control the conversion of Date values to its equivalent UTC date to avoid differences in Timezone across different cultures. Since this conversion is done at server, you need to define the Timezone API in the wrapper itself to store the Date values as UTC Date in the server.  
 
Whereas, setting the Timezone in Javascript will only let you convert the received UTC converted date from server to the client Time zone to be displayed in the browser.  
 
In short, setting Timezone in wrapper will convert the posted date from client to UTC, to be saved in server and setting Timezone in Javascript will convert the Date value received from server to equivalent client Timezone to be displayed in the browser.  
 
Regards,  
Deepa L. 



DL Deepa Loganathan Syncfusion Team December 21, 2018 06:23 PM UTC

Hi Eduardo,  
 
Also, you can set the TimeZone API of Datepicker in Javascript as given below.  
 
$("#datepick").ejDatePicker({ 
                timeZone: true 
            }); 
  
Please get back to us if you have any further queries. 
  
Thanks,  
 
Deepa L. 


Loader.
Live Chat Icon For mobile
Up arrow icon