-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Feature] [Datepicker] Open on Year or Month view #5816
Labels
Comments
I would like to do that |
fhuschle
added a commit
to fhuschle/ngx-bootstrap
that referenced
this issue
Sep 6, 2020
fhuschle
added a commit
to fhuschle/ngx-bootstrap
that referenced
this issue
Sep 6, 2020
fhuschle
added a commit
to fhuschle/ngx-bootstrap
that referenced
this issue
Sep 6, 2020
5 tasks
fhuschle
added a commit
to fhuschle/ngx-bootstrap
that referenced
this issue
Sep 7, 2020
daniloff200
pushed a commit
that referenced
this issue
Sep 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Use cases: Selecting Date of Birth, Date of document issuance, date of entry, or any other date that is likely not to be this year/month (and where year/month aren't predictable).
Let's go with DOB for the rest of this FR.
Currently a user will open the dialog, and either click the back button a lot, or click the year (if they realize they can) and find the required year, month and day.
Describe the solution you'd like
Add an option in the config like
openView
with possible valuesyear
,month
,day
. It would default to day, as that is the current behavior.When the datepicker dialog opens, the initial view should go to the configured view (
year
in the example) as a starting point, rather than always defaulting to day.The new flow would be:
Describe alternatives you've considered
I've looked at the current DatePicker directive to see if this could be achieved relatively easy through some manual triggering, but it can't.
Alternatives would be to take a
view
argument intoggle
andopen
and respond with the needed starting view.Additional context
Note that this is different form
minDate
.minDate
limits the view. This feature would only provide a starting point, but still have the months, years and day selection available.The text was updated successfully, but these errors were encountered: