File tree Expand file tree Collapse file tree 7 files changed +34
-1
lines changed
design/adminhtml/Magento/backend/web/css
internal/Magento/Framework/Data Expand file tree Collapse file tree 7 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -615,6 +615,9 @@ public function getValueElement()
615615 // date format intentionally hard-coded
616616 $ elementParams ['input_format ' ] = \Magento \Framework \Stdlib \DateTime::DATE_INTERNAL_FORMAT ;
617617 $ elementParams ['date_format ' ] = \Magento \Framework \Stdlib \DateTime::DATE_INTERNAL_FORMAT ;
618+ $ elementParams ['placeholder ' ] = \Magento \Framework \Stdlib \DateTime::DATE_INTERNAL_FORMAT ;
619+ $ elementParams ['autocomplete ' ] = 'off ' ;
620+ $ elementParams ['readonly ' ] = 'true ' ;
618621 }
619622 return $ this ->getForm ()->addField (
620623 $ this ->getPrefix () . '__ ' . $ this ->getId () . '__value ' ,
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ define([
220220
221221 var elem = Element . down ( elemContainer , 'input.input-text' ) ;
222222
223+ jQuery ( elem ) . trigger ( 'contentUpdated' ) ;
224+
223225 if ( elem ) {
224226 elem . focus ( ) ;
225227
Original file line number Diff line number Diff line change 38403840
38413841 .rule-param-edit .element {
38423842 display : inline ;
3843+ position : relative ;
3844+ }
3845+
3846+ .rule-param-edit .element input .input-date ,
3847+ .rule-param-edit .element input .input-date [readonly] {
3848+ background-color : @color-white ;
3849+ min-width : 140px ;
3850+ width : 140px !important ;
3851+ cursor : pointer ;
3852+ text-align : center ;
3853+ opacity : 1 ;
3854+ margin-right : 10px ;
3855+ padding-right : 40px ;
3856+
3857+ + .ui-datepicker-trigger {
3858+ position : absolute ;
3859+ width : 140px ;
3860+ text-align : right ;
3861+ left : 0 ;
3862+ }
38433863 }
38443864
38453865 .rule-param-edit .element .addafter {
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ public function getHtmlAttributes()
238238 'onchange ' ,
239239 'disabled ' ,
240240 'readonly ' ,
241+ 'autocomplete ' ,
241242 'tabindex ' ,
242243 'placeholder ' ,
243244 'data-form-part ' ,
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public function getValueInstance()
146146 */
147147 public function getElementHtml ()
148148 {
149- $ this ->addClass ('admin__control-text input-text ' );
149+ $ this ->addClass ('admin__control-text input-text input-date ' );
150150 $ dateFormat = $ this ->getDateFormat () ?: $ this ->getFormat ();
151151 $ timeFormat = $ this ->getTimeFormat ();
152152 if (empty ($ dateFormat )) {
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ public function testGetHtmlAttributes()
195195 'onchange ' ,
196196 'disabled ' ,
197197 'readonly ' ,
198+ 'autocomplete ' ,
198199 'tabindex ' ,
199200 'placeholder ' ,
200201 'data-form-part ' ,
Original file line number Diff line number Diff line change 6666 * Widget calendar
6767 */
6868 $ . widget ( 'mage.calendar' , {
69+ options : {
70+ autoComplete : true
71+ } ,
6972
7073 /**
7174 * Merge global options with options passed to widget invoke
379382 . addClass ( 'v-middle' )
380383 . text ( '' ) // Remove jQuery UI datepicker generated image
381384 . append ( '<span>' + pickerButtonText + '</span>' ) ;
385+
386+ $ ( element ) . attr ( 'autocomplete' , this . options . autoComplete ? 'on' : 'off' ) ;
387+
382388 this . _setCurrentDate ( element ) ;
383389 } ,
384390
You can’t perform that action at this time.
0 commit comments