-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(datetime): add default picker value input #12698
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
feat(datetime): add default picker value input #12698
Conversation
Looks good in first glance. I actually need it too. |
I've added the test. Sorry for multiple commits. |
Any plans for merging this fix? |
I also would like to know when this is being planned for release, having to set the controls value so I can have it as a default when it is used by the user is not very user friendly. Right now I am using the ngModel trick but that is not a good work around as I want my field to be empty but default to todays date when the user is ready to pick |
+1 |
Thanks for the PR, this has been superseded by the fix in 559f4d3. By default we'll set the value to the current time, or the max value supplied. Note, to set the default value, you really should just use |
@mlynch So can we now use max value and default selected date in picker would be current time? |
@jacek-jaskolski Has a great use case here. The field has no value until opening, then has a default value given. |
Follow the issue for updates |
k will be merging this w/ my changes and will have a PR up today |
Thanks @mlynch |
Cool this has been merged with a few updates. Use the How's that? |
@mlynch This fixses our use case. Thank for the update! |
Is there an equivalent for this in V4? |
Short description of what this resolves:
When datetime input has max value greater than current date its by default selected when datetime picker is opened.
Changes proposed in this pull request:
Added pickerDefault input which is selected if datetime has no value.
Ionic Version: 1.x / 2.x / 3.x
3.x