Giter Club home page Giter Club logo

Comments (12)

hexadecy avatar hexadecy commented on August 11, 2024 1

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.

hexadecy avatar hexadecy commented on August 11, 2024 1
  • 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.

hexadecy avatar hexadecy commented on August 11, 2024 1

@andreyjkee it is now published on npmjs. Thanks for you work on this.

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024 1

Ok it was a problem with the parsing format. I was using the Z in my example.

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

You can use the third example to test that: https://beenote.github.io/angular-material-datetimepicker/

from angular-material-datetimepicker.

andreyjkee avatar andreyjkee commented on August 11, 2024

@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.

hexadecy avatar hexadecy commented on August 11, 2024

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.

andreyjkee avatar andreyjkee commented on August 11, 2024

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.

hexadecy avatar hexadecy commented on August 11, 2024

Try with:
date = moment().utcOffset(this.gmtOffset);
But there is no DST when using this.

from angular-material-datetimepicker.

andreyjkee avatar andreyjkee commented on August 11, 2024

I tried, without utc() call problem is stay

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

https://github.com/beenote/angular-material-datetimepicker/releases/tag/v1.15.1

from angular-material-datetimepicker.

andreyjkee avatar andreyjkee commented on August 11, 2024

@hexadecy awesome, thank you! now works as expected!

from angular-material-datetimepicker.

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.