Giter Site home page Giter Site logo

Comments (3)

fgelinas avatar fgelinas commented on September 15, 2024

I had no plan for a 12 hour option. How do you see this exactly ?
Do you mean a timepicker where the user would first select am or pm, then the hour itself and then the minutes ?

from timepicker.

jefferose avatar jefferose commented on September 15, 2024

It's a tough question, and I don't have an answer. Given the multiline configurations, most ideas stop working when it's not split evenly.

You could do something like you propose. (Crude drawing begins)

01 02 03 04 05 06    AM    10 20 30
07 08 09 10 11 12    PM    40 50 60

Again, my problem is that there are lots of people who don't "get" the 24 hour thing. I mean, adding/subtracting 12 is hard, right? So I'm looking for a good timepicker that handles both options.

from timepicker.

tucson-tom avatar tucson-tom commented on September 15, 2024

Yes to this. However, the most natural appearance would be:

      Hours          Minutes     Period
 1  2  3  4  5  6    00 10 20    AM
 7  8  9 10 11 12    30 40 50    PM

e.g. 6:30 AM is natural left to right motion when selecting a time.

It is important to avoid weird time issues.. So this particular layout would only be allowed when hours are 0-23 and a new option like showPeriodColumn is set to true. There are a lot of weird little issues to deal with though. such as clicking one item in each of the three columns to set the time and automatically close the timepicker instead of just hour and minute. So that logic gets a bit more complicated. Also, row calculations get more messy.

IMO, the configuration should be able to dictate the desired layout and should be made generic. If I want three groups of values and a specific layout and have to select one of each to close the widget, that's the ultimate ideal. A callback function takes the user's selections and returns a value to use to populate the field. That way this sort of widget isn't just a time picker, it is a general-purpose picker for very small, fixed data sets that don't fit well into a single select dropdown - it would just happen to be a great way to piece together a string representing the time of day and then this widget could be rewritten to sit on top of that widget to provide a simplified interface.

from timepicker.

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.