Skip to content

Commit 2cdbc47

Browse files
authored
Merge pull request #1 from IgniteUI/date-editor-format
Updating date editor formatting sample.
2 parents e5de1b7 + fe04614 commit 2cdbc47

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
"Date_Object":"Date object",
@@ -24,6 +24,7 @@
2424
"KO_Order_Date": "Order Date",
2525
"KO_Plain_Editors": "Plain INPUTs",
2626
"KO_Ship_Date": "Ship Date",
27+
"set_after_max": "Set after maximum",
2728
"Submit": "Submit",
2829
"time_config": "Time Configuration",
2930
"Title_angular": "AngularJS",

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": "別の表示形式および Date 制限を使用します。表示形式は最小/最大範囲以外の値の入力で表示される警告に使用されます。",
44
"Control_Name": "コントロール名",
55
"date_config": "日付と時間構成",
66
"DatePickers_submited_values": "DatePicker の送信された値",
@@ -24,6 +24,7 @@
2424
"KO_Order_Date": "注文日",
2525
"KO_Plain_Editors": "プレーン INPUT 要素",
2626
"KO_Ship_Date": "出荷日付",
27+
"set_after_max": "最大日付以降に設定",
2728
"Submit": "送信",
2829
"time_config": "時間構成",
2930
"Title_angular": "AngularJS との連携",

0 commit comments

Comments
 (0)