Skip to content

Commit

Permalink
Fix #472: Calendar "inline" ability to use time.
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 27, 2017
1 parent 2da0541 commit e1d97ca
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ PrimeFaces.widget.Calendar = PrimeFaces.widget.BaseWidget.extend({
}
}
else {
var newDate = $.datepicker.formatDate(_self.cfg.dateFormat, _self.getDate());
var newDate = _self.cfg.timeOnly ? '' : $.datepicker.formatDate(_self.cfg.dateFormat, _self.getDate());
if(_self.cfg.timeFormat) {
newDate += ' ' + _self.jqEl.find('.ui_tpicker_time_input')[0].value;
}

_self.input.val(newDate);
_self.fireDateSelectEvent();
Expand Down

0 comments on commit e1d97ca

Please sign in to comment.