Skip to main content

Search and Top Navigation

#2038 closed enhancement (fixed)

Opened December 11, 2007 12:54PM UTC

Closed June 22, 2008 07:14AM UTC

Last modified January 17, 2010 06:10AM UTC

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:
Description

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.

Attachments (0)
Change History (7)

Changed March 14, 2008 04:57PM UTC by paul comment:1

owner: → iMarc

Changed May 24, 2008 03:39AM UTC by comment:2

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed May 24, 2008 04:18PM UTC by paul comment:3

component: ui.coreui.datepicker
version: 1.2.11.5b4

Changed May 27, 2008 10:36PM UTC by paul comment:4

owner: iMarcgrabanski
status: newassigned

Changed June 20, 2008 02:03PM UTC by kbwood comment:5

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));

});

Changed June 22, 2008 07:14AM UTC by kbwood comment:6

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.

Changed June 27, 2008 10:27AM UTC by rdworth comment:7

milestone: → 1.5.1
version: 1.5b41.5