From 696fc7765fa0b8ac6dcbe2943ee5486559e7f3b6 Mon Sep 17 00:00:00 2001
From: Ryan Segura
Date: Wed, 4 May 2016 10:36:11 -0500
Subject: [PATCH] AltField and AltFormat Demos
Added demo codes for AltField and AltFormat in Unix and ODBC date
formats.
---
demo/examples.js | 14 ++++++++++++++
demo/index.html | 45 +++++++++++++++++++++++++++++++++++++++++----
2 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/demo/examples.js b/demo/examples.js
index d4130de..202fb17 100755
--- a/demo/examples.js
+++ b/demo/examples.js
@@ -94,6 +94,20 @@ $(document).ready(function() {
title: 'MonthPicker Dialog Test',
modal: true
});
+
+ $('#AltMonthField').MonthPicker({
+ SelectedMonth: 'Jan, 2016',
+ MonthFormat: 'M, yy', // Short month name, Full year.
+ AltFormat: '@', // Unix time stamp.
+ AltField: '#serverValue' // Selector for hidden input.
+ });
+
+ $('#AltMonthField2').MonthPicker({
+ SelectedMonth: 'Jan, 2016',
+ MonthFormat: 'M, yy', // Short month name, Full year.
+ AltFormat: 'yy-dd-mm', // ODBC time stamp.
+ AltField: '#serverValue2' // Selector for hidden input.
+ });
$("h1").text( $("h1").text().replace('@VERSION', $.MonthPicker.VERSION) );
});
diff --git a/demo/index.html b/demo/index.html
index c06fe30..0e3dd01 100755
--- a/demo/index.html
+++ b/demo/index.html
@@ -188,11 +188,42 @@
Month Format Demonstration
-
-
Inline Menu Demonstration
+
+
Alternate Field/Format Demonstration
- This demonstrates the Month Picker menu inlined in a div tag.
-
+ This demonstrates how the AltField and
+ AltFormat options work so that values shown to the user can be different than what is submitted to the server.
+
+
+
Value shown to user:
+
+
Unix Date value sent to server:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Value shown to user:
+
+
ODBC Date value sent to server:
+
+
+
+
+
+
+
+
+
jQuery UI Dialog Integration Demonstration
@@ -202,6 +233,12 @@
jQuery UI Dialog Integration Demonstration
+
+
Inline Menu Demonstration
+
+ This demonstrates the Month Picker menu inlined in a div tag.
+