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

'Done' button only appears when date is selected in inline datepicker #173

Open ronaldslc opened 13 years ago

ronaldslc commented 13 years ago

As titled, the done button doesn't appear on first load until you physically click on a date when being applied in inline mode.

This is strange because if it appears 'on change' it should also appear when time slider slides, but that isn't the case. By default for the datepicker UI the done button doesn't appear in inline mode at all.

Would be great if you can do one or the other, either show the done button at all times regardless if it's inline, or don't show at all.

ronaldslc commented 13 years ago

I've fixed this issue for you.

Line 775

        inst.inline = inst.stay_open = true;
        //This way the onSelect handler called from calendarpicker get the full dateTime
        this._base_selectDate(id, dateStr + tp_inst._defaults.separator + tp_inst.formattedTime);
        inst.inline = original; // restore inline status to original so _updateDatepicker correctly refreshes UI
        inst.stay_open=false;
pabloalr commented 12 years ago

Yeah, I think the default behaviour should be kept (don't display 'done' button at all when on inline mode).

Thanks for sharing your tip!