diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-07-22 08:28:01 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-07-22 08:28:01 +0000 |
commit | 61e15b1f76e27596b41d95b2b18c5df7f9eaa89f (patch) | |
tree | 669934ca59eceb4da3edc368d5662874bc7c2ca1 /ui | |
parent | 269a4412683dbb05d02de02fb7dd98e23d373ebb (diff) | |
download | jquery-ui-61e15b1f76e27596b41d95b2b18c5df7f9eaa89f.tar.gz jquery-ui-61e15b1f76e27596b41d95b2b18c5df7f9eaa89f.zip |
Datepicker: Fixed #4647 setDate cannot be called multiple times
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.datepicker.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index f82ef3efc..a106ed291 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1197,7 +1197,8 @@ $.extend(Datepicker.prototype, { catch (e) { // Ignore } - var date = new Date(); + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(); var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); |