Comments (6)
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:
- change your moment locale language globally:
moment.locale('fr')
- 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.
this happen when you are not using AM/PM
from angular-moment-picker.
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.
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
from angular-moment-picker.
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.
Sorry for the late answer,
thank you for your help it worked but still a little graphic problem. Watch here:
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)
- Deactivate two days, and for hours HOT 2
- BUG--> duplicate months when using moment time zone.
- The active year doesn't turn blue (highlight) when I use start-date
- datepicker closes when you click on navigation buttons in ionic v1 and angular 1.4
- Hour view after clicking day HOT 1
- Bootstrap 4 not working HOT 1
- How to show 5 columns in date picker
- 31st Day of Month not selecting properly with Custom Format.
- Is there a way to dynamically enable/disable days or hours
- Pop Up of moment-picker position is not fixed. HOT 1
- I cant update my moment picker from controller side HOT 1
- Duplicate hours when there is DST
- _d and _i are different from each other and are not the date I picked
- Set different start-view based on value
- Force picker to use new time zone
- ng-invalid is not set when the date is manually changed to an invalid value
- Inconsistency in hour and minute selector.
- moment picker calendar display issue in mobile view HOT 1
- Ignoring model changes if model is set to string HOT 1
- Build of master generates many ts errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-moment-picker.