Skip to content

Commit

Permalink
fix splitDateTime for plain datepicker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
NetForce1 committed Sep 20, 2012
1 parent 20ec8cf commit 7a6e5f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery-ui-timepicker-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@
timePartsLen = timeParts.length;
}

if (allPartsLen > 0) {
if (allPartsLen > 1) {
return [
allParts.splice(0,allPartsLen-timePartsLen).join(separator),
allParts.splice(0,timePartsLen).join(separator)
Expand Down

0 comments on commit 7a6e5f0

Please sign in to comment.