1

how to set attribute datetime display time ? enter image description here

1
  • Anyone have answer?
    – MrTo-Kane
    Mar 14 '16 at 2:41
0

create file calendar.js below:
path: myPool/myModule/view/adminhtml/web/js/calendar.js

   require([
            "jquery",
            "mage/calendar"
    ], function($){

       $("#period_date_start").calendar({
          // americanMode: false,
          //stepMinute: 15,
          showsTime: true,
            controlType: 'select',
            timeFormat: 'HH:mm',
            showTime: false,
            closeText: "Done",
            selectOtherMonths: true,
            onSelect: function( selectedDate ) {
            $( "#period_date_end" ).datepicker( "option", "minDate", selectedDate );
          }
       });

        $("#period_date_end").calendar({
          showsTime: true,
            controlType: 'select',
            timeFormat: 'HH:mm',
            showTime: false,
            closeText: "Done",
            selectOtherMonths: true,
          onSelect: function( selectedDate ) {
            $( "#period_date_start" ).datepicker( "option", "maxDate", selectedDate );
          }
       });

    });

warning: Check your static content is generated this file.

1
  • i want to use slider instead of select how can I do this need help please Jun 28 '20 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.