Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date.getDate is not a function #15

Closed
rajeshwarpatlolla opened this issue Jan 18, 2016 · 15 comments
Closed

date.getDate is not a function #15

rajeshwarpatlolla opened this issue Jan 18, 2016 · 15 comments

Comments

@rajeshwarpatlolla
Copy link

It is giving me error as shown below.

screen shot 2016-01-19 at 12 54 58 am

@eight04
Copy link
Owner

eight04 commented Jan 18, 2016

Looks like the date object is lack of getDate method. Check if the model is a Date object. Also, an example on Plunker would be nice 😃

@rajeshwarpatlolla
Copy link
Author

I am passing date object itself.

@eight04
Copy link
Owner

eight04 commented Jan 21, 2016

Could you provide any source code?

@janhjordie
Copy link

It seems it's missing some timezone setup. I get the same error

@eight04
Copy link
Owner

eight04 commented May 27, 2016

Any example? https://plnkr.co/

@eight04
Copy link
Owner

eight04 commented May 27, 2016

BTW, there was no timezone option when this issue was created.

@janhjordie
Copy link

I figured it out. As usual it's date converting stuff. I got my date from a C# WebAPI, and I had to convert it to a real javascript date

$scope.birthdate = moment($scope.user.birthdate).toDate();

@eight04
Copy link
Owner

eight04 commented May 27, 2016

If you like to use a string as the model value instead of Date object, try datetime-model="format"

@jamesh38
Copy link

Is there any way to make this play nice with momentjs?

@eight04
Copy link
Owner

eight04 commented Jun 22, 2016

I don't use momentjs. Any suggestion?

@jamesh38
Copy link

Yah I was thinking about it. Seems it would be a substantial rebuild. Ended
up finding a simpler directive that worked with it. But gosh yours is so
nice I was hoping for it to work as well. Thanks for the quick response.

On Wed, Jun 22, 2016, 1:10 PM eight notifications@github.com wrote:

I don't use momentjs. Any suggestion?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ADbj0h0HP1jd_C80n3BcHWjk6bux5vIYks5qOWyegaJpZM4HHLUH
.

@eight04
Copy link
Owner

eight04 commented Jun 23, 2016

Thanks for your appreciate. If you have some idea about how they should work together, feel free to create a new issue.

@alexander-d-com
Copy link

@james-hoegerl mind sharing it? i also get the date.getDate getting data from a c# webApi

@alexander-d-com
Copy link

Anyways, when getting the data from a controller simply calling
new Date($scope.theDate)
will resolve the issue

@eight04
Copy link
Owner

eight04 commented Dec 23, 2016

@james-hoegerl

Starting from v5.0.0, the core parser and input mask are pulled out as custom-input. You might be interested to make it works with momentjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants