Coder Social home page Coder Social logo

12 hour clock option about clockpicker HOT 6 OPEN

weareoutman avatar weareoutman commented on August 19, 2024 1
12 hour clock option

from clockpicker.

Comments (6)

brwnll avatar brwnll commented on August 19, 2024 13
$('input[type="time"]').clockpicker({ twelvehour: true })

from clockpicker.

chinmaykishore avatar chinmaykishore commented on August 19, 2024 3

Search for "ClockPicker.DEFAULTS" in the bootstrap-clockpicker.js file and replace "twelvehour: false" to true. You can also change the "donetext" as "DONE" as shown below.
ClockPicker.DEFAULTS = {
'default': '', // default time, 'now' or '13:14' e.g.
fromnow: 0, // set default time to * milliseconds from now (using with default = 'now')
placement: 'bottom', // clock popover placement
align: 'left', // popover arrow align
donetext: 'DONE', // done button text
autoclose: false, // auto close when minute is selected
twelvehour: true, // change to 12 hour AM/PM clock from 24 hour
vibrate: true // vibrate the device when dragging clock hand
};

from clockpicker.

robertracz avatar robertracz commented on August 19, 2024

It works as far as selecting the time but when you click edit it looses minutes and am/pm. Do you guys experience the same thing?

from clockpicker.

jcg31 avatar jcg31 commented on August 19, 2024

this.minutes brings in a string causing the following line of code to set this.minute to zero
this.minutes = + value[1] || 0;
check isNaN (value[1]) and if true split value[1] and return the first value

from clockpicker.

codal-rsolanki avatar codal-rsolanki commented on August 19, 2024

you can set 12 hours format using
$('input[type="time"]').clockpicker({ twelvehour: true });

from clockpicker.

amitkkphp avatar amitkkphp commented on August 19, 2024

Is it currently possible to use a End_Time LESS Start_Time

Please see below screenshot for easily understood

See This screenshot

from clockpicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.