trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Inline default value #746

Open musickid43 opened 10 years ago

musickid43 commented 10 years ago

When using Inline mode with one alt field, everything defaults to today. Setting value in "defaultValue" and in the alt input's value attribute does not set the control to that datetime.

WilliamStam commented 10 years ago
$('#publishDate_field').datetimepicker({
    altField: "#publishDate",
    altFieldTimeOnly: false,
    altTimeFormat: "HH:mm:ss",
    dateFormat: "yy-mm-dd",
    showSecond: false,
    stepMinute: 15,
    showButtonPanel: false,
    defaultDate: $("#publishDate").val()
});

it shows the default date.. but doesnt pick up the time :( 2014-08-29 15:00:00 becomes 2014-08-29 00:00:00

756gzdz5 commented 9 years ago

This still seems to be an issue.

benjaminfunk commented 8 years ago

+1

systemdarena commented 5 years ago

Ran in to this also. If anyone finds a fix please post it.