Editor Window datetime picker format change in room scheduler

Hello, I am using the room scheduler and in the editor window Start Time and End Time have current format is 'MM/dd/yyyy hh:mm a' which is the default format.
I wanted to change the default format to'dd/MM/yyyy hh:mm a'. Below is my code please check what I am doing wrong.
eventSettings: {
dataSource: data,
fields: {
id: 'Id',
subject: { title: 'Subject', name: 'Subject' },
location: { title: 'Location', name: 'Location' },
description: { title: 'Description', name: 'Description' },
startTime: { title: 'Start Date Time', name: 'StartTime', format:{ type:'dateTime', format:'dd/MM/yyyy hh:mm a' }},
endTime: { title: 'End Date Time', name: 'EndTime',format:{ type:'dateTime', format:'dd/MM/yyyy hh:mm a' } },
}
}
Please take a look on the bold part. please suggest how we can be able to use'dd/MM/yyyy hh:mm a'this format in the editor window (pop up).

3 Replies 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team December 30, 2020 10:24 AM UTC

Hi Atish,  
  
Greetings from Syncfusion support.  
  
We have validated your requirement at our end. We have achieved your requirement with the help of the popupOpen event of the Schedule and format property of the Date time picker and the same can be referred using the following sample.  
 
  
[index.ts]  
  popupOpen: args => {  
    if (args.type === "Editor") {  
      // Changing the format of the start and end date time pickers  
      (args.element.querySelector(".e-start") as any).ej2_instances[0].format =  
        "d/M/yy h:mm a";  
      (args.element.querySelector(".e-end") as any).ej2_instances[0].format =  
        "d/M/yy h:mm a";  
    }  
  }  
  
  
Kindly try the above sample and get back to us if you need any further assistance.  
  
Regards,  
Ravikumar Venkatesan  


Marked as answer

AK Atish Kumar December 30, 2020 01:03 PM UTC

Thanks alot. it worked.  


NR Nevitha Ravi Syncfusion Team December 31, 2020 03:48 AM UTC

Hi Atish,

You are most welcome...! Please get back to us if you need any further assistance.

Regards,
Nevitha

Loader.
Up arrow icon