AEM 6530 - Touch UI Date Picker save Date Time in UTC


AEM Page Properties date picker saves the date set (On Time / Off Time) in User's Time Zone in CRX. This post is to save the date time in UTC, whereas show it in user's time zone...

Demo | Package Install | Github


                 Date saved in user's time zone (CST in screenshot below)


                 Set the property eaem-save-in-utc = true                                            


                 Date saved in UTC in CRX

                 Date shown in Browser


1) Login to CRXDE Lite (http://localhost:4502/crx/de), create folder /apps/eaem-save-date-timezone

2) Create node /apps/eaem-save-date-timezone/clientlib of type cq:ClientLibraryFolder, add String[] property categories with value [cq.authoring.dialog], String[] property dependencies with value lodash.

3) Create file (nt:file) /apps/eaem-save-date-timezone/clientlib/js.txt, add


4) Create file (nt:file) /apps/eaem-save-date-timezone/clientlib/timezone-date.js, add the following code

(function($, CUI, $document){
    var EAEM_SAVE_IN_UTC = "eaem-save-in-utc";

    $document.on("foundation-contentloaded", handleDatePickers);

    function handleDatePickers(){
        var $datePickers = $("coral-datepicker");


        _.each($datePickers, function(datePicker){
            var $datePicker = $(datePicker);


            $datePicker.on("change", setTimeZone);


    function setTimeZone(){
        var datePicker = this, $datePicker = $(this),
            $timeZone = $datePicker.nextAll(".granite-datepicker-timezone");

            $timeZone.attr("hidden", "hidden");

        var toUTC = new Date(datePicker.value).toISOString(),
            message = "Date shown in your timezone, but saved in UTC as " + toUTC;




}(jQuery, window.CUI,jQuery(document)));


  1. Nice blog with Amazing information .. love to read about this.
    Awaiting for your new post
    We at bring to you the most significant Management assignment help writing service at the best cost. With long stretches of understanding we are prepared to give online assignment help over the globe.You will be guided here with a portion of the information of Management assignment which could assist you in deciding writing a Manageent assignment. Nonetheless, we unequivocally prescribe you to benefit Leadership Assignment help from our specialist to find out about marketing and its scope.We also provide Macro Economics Assignment Help from our experts.

  2. The advantage of Online Assignment Help is an adroit choice when it ends up being hard in managing the assignment in school. Our Assignment help online service helps the students in staying at the top of the class with the help of online assignments. We have a pool of authorities in writing the assignment for every educational assignment

  3. Such a wonderful information blog post on this topic provides assignment service at affordable cost in a wide range of subject areas for all grade levels, we are already trusted by thousands of students who struggle to write their academic papers and also by those students who simply want need assignment help to save their time and make life easy.