#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: |
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.
Change History (7)
comment:1 Changed 15 years ago by
Owner: | set to iMarc |
---|
comment:2 Changed 15 years ago by
Milestone: | 1.2.2 |
---|
comment:3 Changed 15 years ago by
Component: | ui.core → ui.datepicker |
---|---|
Version: | 1.2.1 → 1.5b4 |
comment:4 Changed 15 years ago by
Owner: | changed from iMarc to grabanski |
---|---|
Status: | new → assigned |
comment:5 Changed 15 years ago by
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
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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
Milestone: | → 1.5.1 |
---|---|
Version: | 1.5b4 → 1.5 |
Milestone 1.2.2 deleted