Skip to content

Commit 7a6e5f0

Browse files
committed
fix splitDateTime for plain datepicker
When using a plain datepicker, getDate returns always the current date because splitDateTime puts the date in the time part of the result. This change only splits when the input actually contains a time.
1 parent 20ec8cf commit 7a6e5f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-ui-timepicker-addon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@
15511551
timePartsLen = timeParts.length;
15521552
}
15531553

1554-
if (allPartsLen > 0) {
1554+
if (allPartsLen > 1) {
15551555
return [
15561556
allParts.splice(0,allPartsLen-timePartsLen).join(separator),
15571557
allParts.splice(0,timePartsLen).join(separator)

0 commit comments

Comments
 (0)