]> source.dussan.org Git - jquery-ui.git/commitdiff
datepicker: getDate function now gets date whether or not datepicker is opened (fixes...
authorMarc Grabanski <m@marcgrabanski.com>
Sun, 1 Jun 2008 20:30:55 +0000 (20:30 +0000)
committerMarc Grabanski <m@marcgrabanski.com>
Sun, 1 Jun 2008 20:30:55 +0000 (20:30 +0000)
ui/demos/functional/datepicker/debug.html
ui/source/ui.datepicker.js

index a73c5dc6237b15a8e802981dd7cd51a4b3bff21e..91dab145b3ad053fc34807884dac0b8223fbe03c 100644 (file)
@@ -14,7 +14,7 @@
                
                <script type="text/javascript" charset="utf-8">
                        $(function(){
-                               $('#testing').datepicker({ yearRange: '-80:+0' });
+                               $('#testing').datepicker();
                        });
                </script>
        </body>
index 62199f7bbd2e3178976bfce3cd606fd984c76770..2715c38be8bd63ac578d892a6b064f33e1744ef1 100644 (file)
@@ -254,6 +254,9 @@ $.extend(Datepicker.prototype, {
                   Date[2] - the current dates for a range */\r
        _getDateDatepicker: function(target) {\r
                var inst = this._getInst(target._calId);\r
+               if (inst) {\r
+                       inst._setDateFromField($(target)); \r
+               }\r
                return (inst ? inst._getDate() : null);\r
        },\r
 \r