File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
app/code/Magento/Ui/view/base Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 132
132
<arguments >
133
133
<argument name =" js_config" xsi : type =" array" >
134
134
<item name =" extends" xsi : type =" string" >input</item >
135
+ <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/date</item >
135
136
<item name =" config" xsi : type =" array" >
136
137
<item name =" input_type" xsi : type =" string" >date</item >
137
138
</item >
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
3
+ */
4
+ define ( [
5
+ 'moment' ,
6
+ './abstract'
7
+ ] , function ( moment , Abstract ) {
8
+ 'use strict' ;
9
+
10
+ return Abstract . extend ( {
11
+ defaults : {
12
+ dateFormat : 'MM/DD/YYYY'
13
+ } ,
14
+
15
+ /**
16
+ * Converts initial value to the specified date format.
17
+ *
18
+ * @returns {String }
19
+ */
20
+ getInititalValue : function ( ) {
21
+ var value = this . _super ( ) ;
22
+
23
+ if ( value ) {
24
+ value = moment ( value ) . format ( this . dateFormat ) ;
25
+ }
26
+
27
+ return value ;
28
+ }
29
+ } ) ;
30
+ } ) ;
You can’t perform that action at this time.
0 commit comments