Git Product home page Git Product logo

Comments (6)

indrimuska avatar indrimuska commented on June 7, 2024 3

Yes, this is because the minute labels in hour view are defined by the property minutesFormat in the provider and its default value is your moment locale format without the meridiem part (am/pm):

moment.localeData().longDateFormat('LT').replace(/[aA]/, '')

So you could opt one of these options:

  1. change your moment locale language globally: moment.locale('fr')
  2. change the minutesFormat property of the provider:
angular
    .module('myApp', ['moment-picker'])
    .config(['momentPickerProvider', function (momentPickerProvider) {
        momentPickerProvider.options({
            minutesFormat: 'HH:mm'
        });
    }]);

from angular-moment-picker.

gcaferra avatar gcaferra commented on June 7, 2024

this happen when you are not using AM/PM

from angular-moment-picker.

indrimuska avatar indrimuska commented on June 7, 2024

Hi @gcaferra,
I'm not sure to understand your issue, could you please provide a Plunker showing your problem or a valid option-set using the Angular Moment Picker Builder?

from angular-moment-picker.

gcaferra avatar gcaferra commented on June 7, 2024

has you can see when I select 18 he switch to 6 in the seleciton but not in the header then you can only select 6:xx but the intention was 18:xx

datepicker bug

from angular-moment-picker.

indrimuska avatar indrimuska commented on June 7, 2024

Ok @gcaferra, now I understand what is your problem.

Probably, you're setting a format option to any a 12 hours time token "h" or "hh".

As you can see from the moment.js guide "HH" format token is used to display 24 hour time, different from "hh" (used in combination with "a" or "A") to display 12 hour time formats with meridiem label.

Try to change your format property to force a 24 hours time as in the following plunker (ps: I think that your locale language is German, isn't it?):
http://plnkr.co/edit/IRw25e8bhutalNwOD81c?p=preview

Let me know if this solves your issue.

from angular-moment-picker.

gcaferra avatar gcaferra commented on June 7, 2024

Sorry for the late answer,
thank you for your help it worked but still a little graphic problem. Watch here:

calendarbug

the final result is correct but the user get confused from the 24HH-12HH in the Sub Hour selection

from angular-moment-picker.

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.