简体   繁体   中英

How to set 24 hour format in TempusDominus?

How to set 24 hour format in TempusDominus?

    tempusDominus.TempusDominus(document.getElementById('datetimepicker'), {
        format: 'DD.MM.YYYY, HH:mm',
        display: {
            components: {
                clock: true,
            }
        }
     });

If I add a format, I get an error: " Error: TD:: ".format" in not a known option. "

This is the code to set 24hour format:

           const pick1 =new tempusDominus.TempusDominus(document.getElementById('datetimepicker2'),{
              display: {
            components: {
            useTwentyfourHour: true,
                      }
                  }
              });;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM