How to set date format in forms?

I want to write a custom script such that when “Date” field is changed, it will automatically display the date in dd-MMM-yyyy format in “Dateword” field.

frappe.ui.form.on("Sales Invoice", "posting_date", function(frm) { 
      frm.doc.dateword = frappe.utils.formatdate(frm.doc.get_formatted('posting_date'), "dd/MMM/yyyy");

@Justin_Lu You can go to Setup -> System Settings -> Date Format to change date format.

Sambhaji Kolate,
New Indictrans Technologies Pvt Ltd.

Hi There! I wanted to change the date format to dd-MMM-yyyy which ERPNext don’t support from the system setting

@Justin_Lu frappe uses moment.js for date formating.
Check if you can add your format to core frappe and send pull request

Sambhaji Kolate,