Open newargus opened 8 years ago
Hi again :) Yes, I also thought that. But i'm getting stuck on how to implement that:
hi there the second option is better .
The 2 solutions can be useful of course, but i would say that it should preserve format given by ngmodel. If you initiate it with a date, return should be the same. Options should be used to force different behaviors.
+1 that
+1 that
+1
yes this should be implemented, for example when setting the ng-model we always need to have it as Unix time-stamp to send it to the server or when initialising the app ...
But when showing to the user, date-picker should follow the given jalali format for example
format: 'YY/MM/DD hh'
سلام
من توی پروژه خودم از این کتابخانه استفاده کردم ولی مقادیر bind نمیشن
تنظیمات کتابخانه
ADMdtp.setOptions({ calType: 'jalali', format: 'YYYY/MM/DD', default: '', zIndex:99999999 });
مدل با مقادیر زیر هست
birthdaydatepersian:"1336/12/13 00:00:00"
باید مقدار پیشفرض رو بهش بدی هموت مقدار مدل رو تبدیل کن به تاریخ جی سانی و بهش بده
ببخشید اول سلام
Hi again,
I've try to initiate the ng-model with a javascript english datetime format and it is working as expected (format it as option chosen dd/mm/yyyy for french date), but when I get it back from ng-model variable, it return it as formatted option and not to regular english date time. It could be nice feature sometimes but I would have expected to have an option to force retrun in regular date format.
I know the full-date option could do the job, but you have then to handle it in the form submit code.