smDateTimeRangePicker icon indicating copy to clipboard operation
smDateTimeRangePicker copied to clipboard

Invalid date format and model not binding

Open masterprogrammer513 opened this issue 8 years ago • 5 comments

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

masterprogrammer513 avatar Jan 02 '17 12:01 masterprogrammer513

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 :)

Himanshu-Mishr avatar Jan 06 '17 04:01 Himanshu-Mishr

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

mominsamir avatar Jan 07 '17 05:01 mominsamir

@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 avatar Jan 07 '17 05:01 masterprogrammer513

RTL 1 https://postimg.org/image/ux1yjni03/ Rtl2 https://postimg.org/image/eyo0mn4l9/

masterprogrammer513 avatar Jan 07 '17 06:01 masterprogrammer513

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

mominsamir avatar Mar 11 '17 06:03 mominsamir