Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#2038 closed enhancement (fixed)

Split out display date and date value formats

Reported by: adcworks Owned by: grabanski
Priority: major Milestone: 1.5.1
Component: ui.datepicker Version: 1.5
Keywords: Cc:
Blocked by: Blocking:


It would be so very useful to be able to display a different format to the format used as the actual value.

For example, in the UK we use the display format dd/mm/yy which is how i'd like users to see the date in the box when selected.

But we still use the MySQL date and datetime column data types as-is, and as such it would remove a conversion headache to receive yy-mm-dd from the date picker on a form submission.

Change History (7)

comment:1 Changed 15 years ago by paul

Owner: set to iMarc

comment:2 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:3 Changed 15 years ago by paul

Component: ui.coreui.datepicker

comment:4 Changed 15 years ago by paul

Owner: changed from iMarc to grabanski
Status: newassigned

comment:5 Changed 15 years ago by kbwood

You can convert the date formats easily yourself with code like the following during onsubmit:

$('.datepicker').each(function() {

var date = $.datepicker.parseDate('from/format', $(this).val()); $(this).val($.datepicker.formatDate('to/format', date));


comment:6 Changed 15 years ago by kbwood

Resolution: fixed
Status: assignedclosed

Added altField and altFormat settings. altField is the jQuery selector for another input field to be populated with the date upon selection. altFormat is the alternative format to use for this field. You can then achieve the result of displaying the calendar in one format while submitting the selected date in a different format from a hidden field.

comment:7 Changed 15 years ago by rdworth

Milestone: 1.5.1
Version: 1.5b41.5
Note: See TracTickets for help on using tickets.