Comments (12)
You mean when the time is in a format like 06:35 am +02:00
.
Yes, I didn't implement it with edit-input yet.
from angular-material-datetimepicker.
- Not working for offset
'utc' : 0
- Converted to normal JS date instead of staying as moment._isUTC in this special case.
- When changing manually it will shift to a different point in UTC, passing
false
to utcOffset it will only change the local time and stay in the correct time zone.
from angular-material-datetimepicker.
@andreyjkee it is now published on npmjs. Thanks for you work on this.
from angular-material-datetimepicker.
Ok it was a problem with the parsing format. I was using the Z in my example.
from angular-material-datetimepicker.
You can use the third example to test that: https://beenote.github.io/angular-material-datetimepicker/
from angular-material-datetimepicker.
@hexadecy thank you for active collaboration on this change.
I found some issue in my use cases: 9c5d550?diff=split#r28729853 (see comment)
from angular-material-datetimepicker.
Maybe you are offsetting the time with a $watch somewhere in your code.
When I init the date with moment.utc() it changed nothing in my third example case.
I need more info, your template? an example? step by step to reproduce.
from angular-material-datetimepicker.
I create the date with offset (which comes from user stored setting on server, for example "+0000" for London.
ng-models is:
date = moment().utc().utcOffset(this.gmtOffset);
format comes from user settings, in this case it is M/D/YY hh:mm
And i display date with moment(date).format('M/D/YY hh:mm')
time displayed in input in my local timezone, instead of offset
If i change m.utcOffset(offset, false) to m.utcOffset(offset, true), that work as expected.
I can try to reproduce this in simple example if you can share jsdiffle (or analog) with this lib included.
from angular-material-datetimepicker.
Try with:
date = moment().utcOffset(this.gmtOffset);
But there is no DST when using this.
from angular-material-datetimepicker.
I tried, without utc() call problem is stay
from angular-material-datetimepicker.
https://github.com/beenote/angular-material-datetimepicker/releases/tag/v1.15.1
from angular-material-datetimepicker.
@hexadecy awesome, thank you! now works as expected!
from angular-material-datetimepicker.
Related Issues (20)
- min time and max time HOT 1
- Add mdDialog hasBackdrop option HOT 4
- Add am/pm text customization HOT 2
- Do you have this in a non-angular version? HOT 1
- Could not find a declaration HOT 1
- Setting shortTime=true on a date picker shows AM/PM indicator HOT 4
- Picker icons cause layout issues, show-icon enables too many options HOT 8
- Month displayed is not the same as month view HOT 5
- Upgrade angular library HOT 1
- Cannot set default values for all params of the directive. HOT 1
- Support clearing date from dialog HOT 2
- unable to load datetime picker on dialog box. HOT 5
- ng-change not being triggered as expected and validation failing HOT 5
- If ng-disabled is true. Input field is disabled but buttons are not HOT 4
- Date part is lost when editing time HOT 4
- Which Angular Version? HOT 1
- Option to edit both date and time at the same time on dialog? HOT 1
- Not compatible with Angular 1.8
- User cannot use blue bubble on the clock to set time on Firefox HOT 1
- Min/max date comparison is apparently not timezone-safe HOT 2
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-material-datetimepicker.