diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-06-13 13:22:02 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-06-13 13:22:02 +0000 |
commit | f27c0b77bff396f57e8e280cf5da658fffc34dfd (patch) | |
tree | 3cb4492bcb0d7c2b7cfa0c57c6b4993651a2a382 | |
parent | b8b2a5acb81545ed1a20f68379e7982d08ab4d64 (diff) | |
download | jquery-ui-f27c0b77bff396f57e8e280cf5da658fffc34dfd.tar.gz jquery-ui-f27c0b77bff396f57e8e280cf5da658fffc34dfd.zip |
Demonstrate callbacks on range datepickers
-rw-r--r-- | demos/functional/templates/ui.datepicker.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demos/functional/templates/ui.datepicker.html b/demos/functional/templates/ui.datepicker.html index 2a4af253a..ae4c78fba 100644 --- a/demos/functional/templates/ui.datepicker.html +++ b/demos/functional/templates/ui.datepicker.html @@ -182,13 +182,16 @@ { title: 'Callbacks', desc: 'Custom functions may be invoked when certain events occur within the datepicker.', - html: '<input type="text" size="10" value="" id="callbacks"/>', + html: '<input type="text" size="24" value="" id="callbacks"/>', destroy: '$("#callbacks").datepicker("destroy");', options: [ { desc: 'On select', source: '$("#callbacks").datepicker({onSelect: function(date) { alert("The chosen date is " + date); }, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'On close', source: '$("#callbacks").datepicker({onClose: function(date) { alert("Closed with date " + date); }, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, - { desc: 'On change of month/year', source: '$("#callbacks").datepicker({onChangeMonthYear: function(date) { alert("Moved to month " + $.datepicker.formatDate("MM yy", date)); }, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' } + { desc: 'On change of month/year', source: '$("#callbacks").datepicker({onChangeMonthYear: function(date) { alert("Moved to month " + $.datepicker.formatDate("MM yy", date)); }, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, + { desc: 'On select for range', source: '$("#callbacks").datepicker({onSelect: function(date) { alert("The chosen dates are " + date); }, rangeSelect: true, numberOfMonths: 2, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, + { desc: 'On close for range', source: '$("#callbacks").datepicker({onClose: function(date) { alert("Closed with dates " + date); }, rangeSelect: true, numberOfMonths: 2, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, + { desc: 'On change of month/year for range', source: '$("#callbacks").datepicker({onChangeMonthYear: function(date) { alert("Moved to month " + $.datepicker.formatDate("MM yy", date)); }, rangeSelect: true, numberOfMonths: 2, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' } ] }, |