• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

26
Views
Tempus Dominus 6 time picker 24h

i use Tempus Dominus for select time in my website.

i want to remove AM, PM text from time picker and have 00-23 instead.

screenshot:

enter image description here

my code:

$('#datepickerTime').tempusDominus({
            useCurrent: false,
            stepping: 15,
            display: {
                viewMode: 'clock',
                buttons: {
                    close: true,
                },
                components: {
                    useTwentyfourHour: true,
                    decades: false,
                    year: false,
                    month: false,
                    date: false,
                    hours: true,
                    minutes: true,
                    seconds: false
                }
            }
        });
about 1 month ago ·

Juan Pablo Isaza

1 answers
Answer question

0

Version 6 of TempusDominus explicitly removes dependency/compatibility with jQuery (see here), which is what you're using to initialise your picker.

If you instantiate it like this it will work as expected:

new tempusDominus.TempusDominus(document.getElementById('datepickerTime'), {
    useCurrent: false,
    stepping: 15,
    display: {
        viewMode: 'clock',
        buttons: {
            close: true,
        },
        components: {
            useTwentyfourHour: true,
            decades: false,
            year: false,
            month: false,
            date: false,
            hours: true,
            minutes: true,
            seconds: false
        }
    }
});
about 1 month ago · Juan Pablo Isaza Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.