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

Invalid date format and model not binding #115

Open
masterprogrammer513 opened this issue Jan 2, 2017 · 5 comments
Open

Invalid date format and model not binding #115

masterprogrammer513 opened this issue Jan 2, 2017 · 5 comments

Comments

@masterprogrammer513
Copy link

masterprogrammer513 commented Jan 2, 2017

Hello
Thank you for awesome design
1- I want to use date type format 'YYYY/MM/DD HH:mm' but do not accept this format and send me error invalid date I want year in first.
2- I want to use / instead of - but in load data show by - not /
3- When I set model date load successfully but time not shown.
4- please !important red color. Its blue in my project I like red one.
5- Please force LTR or add option config direction my project is RTL and everything is reversed

@Himanshu-Mishr
Copy link
Contributor

Hi, I know the fix for this. But I am not able to understand that attributes like mode, format are getting assigned to self but not $scope. So problem is that code takes values from $scope (like mode, format), which is not there.
For fix, un-comment these lines for whatever mode you want.

self.mode = angular.isUndefined($scope.mode) ? 'date' : $scope.mode;
self.format = angular.isUndefined($scope.format) ? 'MM-DD-YYYY' : $scope.format;

If someone can help me understand this part, I can fix and submit changes.
Cheers :)

@mominsamir
Copy link
Owner

can u tell me which directive u want to apply this fix to, I will help you out in understanding it

@masterprogrammer513
Copy link
Author

masterprogrammer513 commented Jan 7, 2017

@mominsamir
I used this one:

When I load model with "1988/10/25" (Error invalid date format)
I put model data in load : "10/12/1988 12:20" but loaded 10/12/1988 time not shown in date
I used this datetime in my RTL version website please force ltr direction in objects thank you

@masterprogrammer513
Copy link
Author

@mominsamir
Copy link
Owner

sorry for late reply, this date should work fine as long as date format is defined in picker attribute. I will create demo for above mentioned dates and test it

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

3 participants