Skip to content

Commit 9109482

Browse files
committed
Updating date editor formatting sample.
1 parent 28481cb commit 9109482

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

HTMLSamples/editors/date-and-time-formats.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,41 @@ <h4>$$(time_config)</h4>
3838

3939
<h4>$$(constraints)</h4>
4040
<div id="constraintEditor"></div>
41-
41+
<br />
42+
<button id="setMax">$$(set_after_max)</button>
4243
</div>
4344

4445
<script>
4546

4647
$(function () {
4748

4849
$("#defaultDateEditor").igDateEditor({
49-
width: 200,
5050
value: new Date(2015, 9, 9)
5151
});
5252

5353
$("#dateTimeEditor").igDateEditor({
54-
width: 200,
5554
dateInputFormat: "dateTime",
5655
value: new Date(2015, 9, 9, 9, 9)
5756
});
5857

5958
$("#timeEditor").igDateEditor({
60-
width: 200,
6159
dateInputFormat: "time",
6260
value: new Date(2015, 9, 9, 9, 9)
6361
});
6462

6563
$("#constraintEditor").igDateEditor({
66-
width: 200,
64+
dateInputFormat: "MM/dd/yyyy",
65+
dateDisplayFormat: "dddd, MMM d, yyyy",
6766
minValue: new Date(2012, 9, 24),
68-
maxValue: new Date(2018, 9, 24),
69-
value: new Date(2015, 9, 9),
70-
nullText: "$$(enter_today)",
71-
unfilledCharsPrompt: " "
67+
maxValue: new Date(2017, 9, 24),
68+
value: new Date(2017, 9, 9)
7269
});
7370

71+
$("#setMax").igButton({
72+
click: function () {
73+
$("#constraintEditor").igDateEditor("value", new Date(2018, 9, 26));
74+
}
75+
});
7476
});
7577

7678
</script>

HTMLSamples/editors/strings-en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Change_DatePickers_dataMode": "Change DatePickers dataMode option",
3-
"constraints": "Date Contraints, Hide Input Mask",
3+
"constraints": "Using different display format and Date constraints. Note the display format is used for the warning shown when entering value outside the min/max range.",
44
"Control_Name": "Control Name",
55
"date_config": "Date and Time Configuration",
66
"DatePickers_submited_values": "DatePickers submitted values",
@@ -22,6 +22,7 @@
2222
"KO_Order_Date": "Order Date",
2323
"KO_Plain_Editors": "Plain INPUTs",
2424
"KO_Ship_Date": "Ship Date",
25+
"set_after_max": "Set after maximum",
2526
"Start_Date": "Start Date",
2627
"Submit": "Submit",
2728
"time_config": "Time Configuration",

HTMLSamples/editors/strings-ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Change_DatePickers_dataMode": "DatePicker の dataMode オプションを変更",
3-
"constraints": "日付の制約、入力マスクの非表示",
3+
"constraints": "Using different display format and Date constraints. Note the display format is used for the warning shown when entering value outside the min/max range.",
44
"Control_Name": "コントロール名",
55
"date_config": "日付と時間構成",
66
"DatePickers_submited_values": "DatePicker の送信された値",
@@ -22,6 +22,7 @@
2222
"KO_Order_Date": "注文日",
2323
"KO_Plain_Editors": "プレーン INPUT 要素",
2424
"KO_Ship_Date": "出荷日付",
25+
"set_after_max": "Set after maximum",
2526
"Start_Date": "開始日",
2627
"Submit": "送信",
2728
"time_config": "時間構成",

0 commit comments

Comments
 (0)