Skip to content
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

chore: set datepicker default view to minimum date #574

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Nov 3, 2020

Problem

Closes #377

Solution

  • set dateOptions.initDate = dateOptions.minDate

Tests

Tested on GSIB-IE

  • Create date field. Set custom date range with minimum date in the distant past (e.g. 2015). Open the form in public view. Check that the datepicker opens to the month of the minimum date by default.
  • Create date field with no date validation. Open in public view. Check that the datepicker opens to the current month by default.

@tshuli tshuli requested a review from mantariksh November 3, 2020 03:07
@tshuli tshuli marked this pull request as ready for review November 3, 2020 03:07
Copy link
Contributor

@mantariksh mantariksh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my spidey sense is tingling because of how harmless this looks, pls test thoroughly!

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do consider code clarity to other developers as well - I think it can be more obvious that initDate is only set when minDate is present.

@tshuli tshuli force-pushed the datepicker-default branch from 8b89a0d to e89da38 Compare November 9, 2020 02:31
@tshuli tshuli requested a review from liangyuanruo November 9, 2020 02:42
@tshuli tshuli merged commit 47509a0 into develop Nov 9, 2020
@tshuli tshuli deleted the datepicker-default branch November 9, 2020 13:24
@tshuli tshuli mentioned this pull request Nov 10, 2020
@tshuli tshuli restored the datepicker-default branch December 4, 2020 11:55
@liangyuanruo liangyuanruo deleted the datepicker-default branch January 26, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datepicker default view when custom range specified
3 participants