Skip to content

Conversation

thet
Copy link
Member

@thet thet commented Jul 20, 2020

Ready to review.

Works as we discussed it:
When "date input A" depends on "date input B" via the after argument the following happens:

  • If A is unset but B is set, it will be set to B+offset days
  • If B > A, A will be set to B+offset days

@pilz - I have the feeling that my wording in the documentation is a bit clumsy. I'd happy for improvements.
See the example in index.html on how to use it.

Special feature: It should work with multiple "after" dependencies - so if the after selector matches multiple other input fields, it should update for each of them.

When starting this branch with make serve there are two new inputs at the end of this page, configured with an offset of 2 days:
http://0.0.0.0:3001/src/pat/date-picker/

Screenshot from 2020-11-03 13-11-12

Also I've updated the pat-validation demo with this feature:

Screenshot from 2020-11-03 13-12-30

planning-end updates when planning-start > planning-end but can still be set to a wrong date.

@thet thet changed the title end date should update when changing start date [WIP] end date should update when changing start date Jul 20, 2020
@thet thet mentioned this pull request Oct 27, 2020
thet added 5 commits November 3, 2020 12:58
pat date picker: Remove ``format`` argument and just use the ISO 8601 standard "YYYY-MM-DD", like the specification of date inputs defines it.
Format would have submitted a formatted value where the ISO standard is expected.
This also allows for removing the dependency of ``pat-date-picker`` on MomentJS.
@thet thet removed the hold merge label Nov 3, 2020
@thet thet changed the title [WIP] end date should update when changing start date end date should update when changing start date Nov 3, 2020
@thet thet requested a review from pilz November 3, 2020 12:00
@pilz pilz merged commit 0a7b4a1 into master Nov 4, 2020
@pilz pilz deleted the scr-33 branch November 4, 2020 10:40
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.

2 participants