We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apologies if this has been recorded before.
I'm using version 0.9.3.
I want to display a pretty format to the user: dateFormat: 'DD, d MM yy', timeFormat: 'hh:mm',
dateFormat: 'DD, d MM yy', timeFormat: 'hh:mm',
And store an equivalent timestamp in a hidden field (for processing), so have used: altFormat: '@'
altFormat: '@'
This seems to work if I select a date and hit 'Esc'. But if I select a date and click "Done" the pretty format is put into the hidden field.
Why? How can I enforce the use of the AltFormat?
The text was updated successfully, but these errors were encountered:
Sorry I posted #226 issue on same subjects. #226
Sorry, something went wrong.
Use
altFieldTimeOnly: false
And apply this patch to v1.0.0
Index: jquery-ui-timepicker-addon.js =================================================================== --- jquery-ui-timepicker-addon.js (revision xxxx) +++ jquery-ui-timepicker-addon.js (working copy) @@ -870,6 +870,9 @@ if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) return; + var altFormat = $.datepicker._get(dp_inst, 'altFormat') || $.datepicker._get(dp_inst, 'dateFormat'); + var altFormattedDateTime = $.datepicker.formatDate(altFormat, new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay, this.hour, this.minute, this.second, this.millisec), formatCfg); + if (this._defaults.timeOnly === true) { formattedDateTime = this.formattedTime; } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { @@ -884,7 +887,7 @@ this.$altInput.val(this.formattedTime); this.$input.val(this.formattedDate); } else if(this.$altInput) { - this.$altInput.val(formattedDateTime); + this.$altInput.val(altFormattedDateTime); this.$input.val(formattedDateTime); } else { this.$input.val(formattedDateTime);
No branches or pull requests
Apologies if this has been recorded before.
I'm using version 0.9.3.
I want to display a pretty format to the user:
dateFormat: 'DD, d MM yy', timeFormat: 'hh:mm',
And store an equivalent timestamp in a hidden field (for processing), so have used:
altFormat: '@'
This seems to work if I select a date and hit 'Esc'. But if I select a date and click "Done" the pretty format is put into the hidden field.
Why? How can I enforce the use of the AltFormat?
The text was updated successfully, but these errors were encountered: