DateTimePicker icon indicating copy to clipboard operation
DateTimePicker copied to clipboard

Dateformat :: forward slash

Open sigurdne opened this issue 8 years ago • 1 comments

Would it be possible to use the forward slash as separator ? As in dd/MM-yyyy https://en.wikipedia.org/wiki/Date_format_by_country

Regards

sigurdne avatar Oct 28 '16 07:10 sigurdne

  • You can achieve this using Locale-specific date separators If you want dateSeparator to be locale-specific, you can set dateSeparator, dateFormat and dateTimeFormat in locale files. For example, you want "/" as a date separator, so you can set it in "DateTimePicker-i18n-en-US.js" file as -
dateSeparator: "/",

dateFormat: "MM/dd/yyyy",
dateTimeFormat: "MM/dd/yyyy HH:mm"

But this will be global, the same date separator should be used for all fields.

  • It is possible to add data attribute for separator settings. There are five separator fields - dateSeparator, timeSeparator, timeMeridiemSeparator, dateTimeSeparator, monthYearSeparator. Can you list fields for which data attribute should be added? Since there was no such requirement these data attributes were not added.

nehakadam avatar Oct 30 '16 09:10 nehakadam