Giter Club home page Giter Club logo

Comments (6)

hexadecy avatar hexadecy commented on August 11, 2024

@j-walker23 you are right. Easiest way to check: {{date._isAMomentObject}}

._d is the internal date of moment.

$mdDialog.show(dialogOptions).then(function(v) {
   scope.currentDate = v ? v._d : v;

Do you know why ?

from angular-material-datetimepicker.

j-walker23 avatar j-walker23 commented on August 11, 2024

from angular-material-datetimepicker.

j-walker23 avatar j-walker23 commented on August 11, 2024

Actually, i think i might have a feature request after looking at the code. If i pass a moment utc value in, then the object returned after date/time selection stay in utc.

This came up from giving the directive a utc moment object. Then after an edit through the directive is made, the date shown gets shifted by whatever my timezone offset is. Confusing the user who selected a time, and then is displayed what might seem like a different random time. Guessing that would be new functionality.

I can handle conversions with ng-change. Just thought i would bring it up. Thanks again.

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

@j-walker23 can you test it?

Yes it's a bug and can be confusing.
Now if a moment utc is passed it will stay as passed.
Do not use with edit-input="true" for now.

Since version 1.0, logbon72 chose to return a js date, but returning a moment (local) can also be done.

from angular-material-datetimepicker.

j-walker23 avatar j-walker23 commented on August 11, 2024

Damn, i just saw this. Thank you, I will test it today!

from angular-material-datetimepicker.

j-walker23 avatar j-walker23 commented on August 11, 2024

Worked perfectly. Thank you!

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.