Giter Site home page Giter Site logo

dmuy / mdtimepicker Goto Github PK

View Code? Open in Web Editor NEW
50.0 5.0 26.0 435 KB

Material design inspired time picker plugin for input elements.

Home Page: https://dmuy.github.io/MDTimePicker/

License: MIT License

JavaScript 70.00% SCSS 30.00%
material-design time-picker material-timepicker material-time-picker

mdtimepicker's People

Contributors

dependabot[bot] avatar dmuy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mdtimepicker's Issues

PM reverts back to AM on timepicker close

I've run into an odd behavior with the AM/PM response from the timepicker. Here's how to reproduce it:

  • Set the input field to a PM time (I used 1:00PM)
  • Open the timepicker by clicking on the field
  • Change the hour to 12 specifically.
  • Do not click the AM/PM indicators. PM will still be highlighted.
  • Click OK.
  • Value placed back into input field will now say 12:00AM, not 12:00PM.

The issue seems to be specific to a time that starts as a PM time and is changed specifically to a "12" hour (changing from 2:00PM to 1:00PM returns 1:00PM like it should).

I have the timepicker configured with the following settings:
theme: 'blue',
format: 'h:mmtt',
hourPadding: false,
readOnly: true

I briefly tried using a format of 'hh:mmtt' to test 24-hour mode, and in those cases I got a 00:00 time back instead of a 12:00 time (consistent with the issue outlined above).

Any suggestions? I took a look at the javascript file, but unfortunately my JavaScript skills aren't up to the task yet.

I'm testing with Firefox 60.0.1 64-bit on Linux (Ubuntu Studio).

Thanks!

Code-Typo in Wiki

Hey,

under the Nuxt 3 section there is following line as an example:
nextApp.vueApp.use(vueTimePicker, { theme: 'dark', is24hour: true })

However, it just be "nuxtApp", not "nextApp", little annoying when copy pasting.

Thanks for this project BTW!

Show Minutes Only

What options I need to pass to show minutes only selector?
I want user to choose minutes form 0 to 59.

Feature Request: Should the AMPM button on the top of the picker be clickable to change the period?

Hey there 👋,

So I was trying out the time picker which was amazing btw. Anyway, I just had a little problem with it, the AMPM button cannot be clicked to toggle the period. I have solved this problem by changing the source code locally. It was a simple change, but I just wanted to maybe put this feature live so people do not have to implement it themselves.

Sincerely,

Catalactics (Joshua Pelealu)

how to set step in mdtimepicker

I want to set step for example step: 15 minutes that will look like so in minutes 0, 15, 30, 45, 00 but i can't see any option available for it.

Uncaught TypeError: $(...).mdtimepicker is not a function

4 <script src="assets/vendor/jquery3/jquery.min.js"></script> <script src="assets/vendor/bootstrap4/js/bootstrap.bundle.min.js"></script> <script src="assets/vendor/fontawesome5/js/solid.min.js"></script> <script src="assets/vendor/fontawesome5/js/fontawesome.min.js"></script>
<script type="text/javascript" src="assets/vendor/mdtimepicker/mdtimepicker.js"></script>

<script src="assets/js/script.js"></script>
<script>
    $('.timepicker').mdtimepicker(); // Initialize time picker
</script>

"Uncaught TypeError: $(...).mdtimepicker is not a function"

I'm trying to use it that way and get this error, how can I solve it?

readOnly: false option (and inline: true option)

I noticed this option in a sample on this site (https://www.jqueryscript.net/time-clock/Material-Time-Picker-Plugin-jQuery-MDTimePicker.html):

readOnly: false

It isn't listed in the options though and doesn't do anything when set.

Are there plans to support it?! I'd like to be able to enter time by typing on the keyboard in addition to the GUI.

p.s. also, any plans to support an inline: true option too to embed the MDTimePicker directly in a body div instead of an input field?

writing own time

The time pickers's time is not updated when you write your own time in the input field. I presumed that when I write say 5:00 PM in the input field then the clock arms are pointed to 5:00, PM button is active state and the time displayed is also updated to correspond to what was written. Just a suggestion though.

Set DEFAULTS

In the older jQuery version was a way to set defaults like so:
$.extend($.fn.mdtimepicker.defaults, { timeFormat: 'hh:mm:ss.000', format: 'hh:mm', theme: 'custom', readOnly: true, hourPadding: false, strCancel: 'stornieren', strOk: 'Ok', is12Hour: false });

This should be implemented again in a similar way..

Suggenstion: add custom theme as option

Suggenstion:
It would be great if a custom theme could be passed as an option.
Now i overrule the default theme but if i can pass the theme name as an option i do not have to overrule the default theme.

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.