Closed marcochavezf closed 8 years ago
Hi Marco, thanks for your work, it's amazing!
It has some problems though. Now the day can be changed even by month, year, hours, minutes and seconds buttons. This is not covered by your PR. Furthermore, you are introducing dates in ISO format which is what I wanted to avoid.
For v1 milestone, I'm going to introduce an argument that would be user-supplied function that would validate if any datetime is valid.
If anybody is interested in this feature before it is merged, feel free to add "ion-datetime-picker": "marcochavezf/ion-datetime-picker#dd5164b"
to your bower.json
.
I´m interested in this feature. What attributes should I use if my valid date is only within the last 3 months. Can I use as said above only-valid="{'after': '2016-03-20' }"
? @katemihalikova
Correct @lumarega, I'm working on the problems @katemihalikova commented. Maybe today I'm gonna push a fixed version (at least when the day is changed by month/year/etc) :)
ok thanks @marcochavezf :D If its possible please let me know when you have implemented it so I can try it out.
@lumarega @katemihalikova I fixed the problem when the date is changed (by month, year, etc.) to a disabled range. It just set the last or next valid date. Kate which approach could we use to avoid dates in ISO format, sorry but it's not clear for me what another approach we could use :) Cheers!
@marcochavezf good job! I also need that feature. I wanted even to implement the same thing but if there is already pull request I'm waiting for merge :)
@przemkow Could you please test this? I will merge it then.
Sure, I'll try to test it today
for me it looks fine :) @katemihalikova bug you mentioned before is right now well covered, it's impossible to choose disabled date in any way
Thanks! Let's solve the format later for v1.
Hi Kate! hope your're fine. At my work we're using your awesome date picker, but we require to disable or enable dates in different ways (by range or after/before certain day). According to our needs I think it will be useful to enable/disable dates by this way:
for example if we need to allow only select days after 2016-04-09, we use:
only-valid="{'after': '2016-04-09' }"
or if we need to disable days prior to today we use ('inclusive' will include today's date):
only-valid="{'after': 'today', 'inclusive': true }"
of by range:
only-valid="{'outside': {'initial': '2016-04-09', 'final': '2016-06-15'}, 'inclusive': true }"
I hope my implementation is ok, any issue/mod please let me know :)