From d165e454b4a06d99f83bfb2f86546a1e3b4470c9 Mon Sep 17 00:00:00 2001 From: Keith Wood Date: Wed, 23 Jul 2008 12:39:48 +0000 Subject: Fixed 3107 Dialog example does not return false when clicked Demonstrate inline disabled datepicker Demonstrate big previous/next links --- demos/functional/index.html | 3 ++- demos/functional/templates/ui.datepicker.dbd.html | 12 ++++++------ demos/functional/templates/ui.datepicker.dlg.html | 2 +- demos/functional/templates/ui.datepicker.html | 20 ++++++++++++-------- demos/functional/templates/ui.datepicker.inl.html | 14 ++++++++++++++ demos/functional/templates/ui.datepicker.sel.html | 22 +++++++++++----------- 6 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 demos/functional/templates/ui.datepicker.inl.html (limited to 'demos') diff --git a/demos/functional/index.html b/demos/functional/index.html index 8ec565c72..65172a4c7 100644 --- a/demos/functional/index.html +++ b/demos/functional/index.html @@ -15,6 +15,7 @@ + @@ -107,7 +108,7 @@
-
+
diff --git a/demos/functional/templates/ui.datepicker.dbd.html b/demos/functional/templates/ui.datepicker.dbd.html index c77f7bac0..6b2573461 100644 --- a/demos/functional/templates/ui.datepicker.dbd.html +++ b/demos/functional/templates/ui.datepicker.dbd.html @@ -14,27 +14,27 @@ .za_day { color: green !important; background: #eee url(templates/images/za.gif) no-repeat center !important; } \ No newline at end of file diff --git a/demos/functional/templates/ui.datepicker.dlg.html b/demos/functional/templates/ui.datepicker.dlg.html index d2875a925..4d5eaaa7f 100644 --- a/demos/functional/templates/ui.datepicker.dlg.html +++ b/demos/functional/templates/ui.datepicker.dlg.html @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/demos/functional/templates/ui.datepicker.html b/demos/functional/templates/ui.datepicker.html index 112ef484f..2f1d5a817 100644 --- a/demos/functional/templates/ui.datepicker.html +++ b/demos/functional/templates/ui.datepicker.html @@ -89,6 +89,7 @@ '
  • MM - month name long
  • ' + '
  • y - year (two digit)
  • ' + '
  • yy - year (four digit)
  • ' + + '
  • @ - Unix timestamp (ms since 01/01/1970)
  • ' + '
  • \'...\' - literal text
  • ' + '
  • \'\' - single quote
  • ', html: '', @@ -158,15 +159,16 @@ title: 'Inline Datepicker', desc: 'A datepicker can also be shown inline, rather than popping-up, by targetting a division instead of an input field. ' + 'Use the onSelect callback to be notified of date selections.', - html: '
    \n' + - '

    ', - destroy: '$("#inline").datepicker("destroy");', + html: { url: 'templates/ui.datepicker.inl.html' }, + destroy: '$("#inline").datepicker("destroy");$("#altInline").unbind("keyup");', options: [ - { desc: 'Single month inline', source: '$("#inline").datepicker({onSelect: function(date) { alert("The chosen date is " + date); }});' }, - { desc: 'Range select inline', source: '$("#inline").datepicker({rangeSelect: true, onSelect: function(date) { alert("The chosen dates are " + date); }});' }, - { desc: 'Range select showing two months inline', source: '$("#inline").datepicker({rangeSelect: true, numberOfMonths: 2}).children("div").css("width", "370px");' }, - { desc: 'Highlight some national days (via CSS)', source: '$("#inline").datepicker({beforeShowDay: nationalDays});' } + { desc: 'Single month inline', source: '$("#inline").datepicker({onSelect: function(date) { alert("The chosen date is " + date); }});$("#altInline").hide();' }, + { desc: 'Range select inline', source: '$("#inline").datepicker({rangeSelect: true, onSelect: function(date) { alert("The chosen dates are " + date); }});$("#altInline").hide();' }, + { desc: 'Range select showing two months inline', source: '$("#inline").datepicker({rangeSelect: true, numberOfMonths: 2}).children("div").css("width", "370px");$("#altInline").hide();' }, + { desc: 'Highlight some national days (via CSS)', source: '$("#inline").datepicker({beforeShowDay: nationalDays});$("#altInline").hide();' }, + { desc: 'Inline linked to an input field', source: '$("#inline").datepicker({altField: "#altInline", altFormat: "mm/dd/yy"});$("#altInline").show().keyup(setInlineDate);' }, + { desc: 'Disabled inline', source: '$("#inline").datepicker().datepicker("disable");$("#altInline").hide();' } ] }, @@ -177,7 +179,7 @@ destroy: '', options: [ - { desc: 'Open in a dialog', source: '$("#dialogButton").click(function() { $(this).datepicker("dialog", $("#dialog").val(), setDateFromDialog, {prompt: "Choose a date", duration: ""}) });' } + { desc: 'Open in a dialog', source: '$("#dialogButton").click(function() { $(this).datepicker("dialog", $("#dialog").val(), setDateFromDialog, {prompt: "Choose a date", duration: ""}); return false; });' } ] }, @@ -248,6 +250,8 @@ { desc: 'Append text to the datepicker', source: '$("#misc").datepicker({appendText: "(format mm/dd/yyyy)", showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'Move Clear/Close controls to the bottom', source: '$("#misc").datepicker({closeAtTop: false, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'Make the datepicker mandatory (no Clear)', source: '$("#misc").datepicker({mandatory: true, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, + { desc: 'Show big Prev/Next links', source: '$("#misc").datepicker({showBigPrevNext: true, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, + { desc: 'Show big Prev/Next links moving 6 months', source: '$("#misc").datepicker({showBigPrevNext: true, stepBigMonths: 6, prevText: "<", prevBigText: "<6M", nextText: ">", nextBigText: "6M>", showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'Hide Prev/Next links if not applicable', source: '$("#misc").datepicker({hideIfNoPrevNext: true, minDate: new Date(2008, 1 - 1, 26), maxDate: new Date(2008, 3 - 1, 26), showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'Prev/Today/Next links as date formats', source: '$("#misc").datepicker({navigationAsDateFormat: true, prevText: "<M", currentText: "M y", nextText: "M>", showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true});' }, { desc: 'Prev/Today/Next links as date formats in French', source: '$("#misc").datepicker($.extend({}, $.datepicker.regional["fr"], {navigationAsDateFormat: true, prevText: "<MM", currentText: "MM yy", nextText: "MM>", numberOfMonths: 2, stepMonths: 2, showOn: "both", buttonImage: "templates/images/calendar.gif", buttonImageOnly: true}));' }, diff --git a/demos/functional/templates/ui.datepicker.inl.html b/demos/functional/templates/ui.datepicker.inl.html new file mode 100644 index 000000000..9543a98eb --- /dev/null +++ b/demos/functional/templates/ui.datepicker.inl.html @@ -0,0 +1,14 @@ + +
    +

    + \ No newline at end of file diff --git a/demos/functional/templates/ui.datepicker.sel.html b/demos/functional/templates/ui.datepicker.sel.html index cc8ff25e3..3f8185af2 100644 --- a/demos/functional/templates/ui.datepicker.sel.html +++ b/demos/functional/templates/ui.datepicker.sel.html @@ -29,26 +29,26 @@ -- cgit v1.2.3