Feature #2716
closedFE: DateTimePicker - support min and max date validations
100%
Description
Possible use cases:
- only future date can be selected.
- data can be selected in given range - maximum once ear in future.
Add validation error messages.
Related issues
Updated by Radek Tomiška almost 4 years ago
- Related to Feature #2699: Support setting maximal validity of a contract added
Updated by Radek Tomiška almost 4 years ago
- Subject changed from FE: DateTimePicker - support min a max date validations to FE: DateTimePicker - support min and max date validations
- Status changed from In Progress to Needs feedback
- Assignee changed from Radek Tomiška to Ondrej Husník
- % Done changed from 0 to 90
Feature is implemented. DateTimePicker supports validate, minDate and maxDate validations.
Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/c09bdefd9fc92876f6368e917760658e6141b0f5
Could you provide me a feedback, please?
Updated by Ondrej Husník over 3 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Ondrej Husník to Radek Tomiška
- % Done changed from 90 to 80
I tried this feature and it's awesome, especially with connection to projection, which is since now again more flexible. But there is one thing which doesn't work as I would expect. We generally allow not to fill the date value, which is interpreted as unlimited validity. But if I set e.g. max date validations to 10 days and set unlimited contract validity (I used contract for testing), no error is shown!! I think it should be shown.
Updated by Ondrej Husník over 3 years ago
Ondrej Husník wrote:
.... But there is one thing which doesn't work as I would expect. We generally allow not to fill the date value, which is interpreted as unlimited validity. But if I set e.g. max date validations to 10 days and set unlimited contract validity (I used contract for testing), no error is shown!! I think it should be shown.
This was wrongly understood and can be solved with setting both max date validation and also set field as required. Then empty date also fails validation which is correct. Described here.
https://wiki.czechidm.com/tutorial/adm/user-type#add_new_projection
Updated by Ondrej Husník over 3 years ago
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100
Updated by Radek Tomiška over 3 years ago
- Status changed from Resolved to Closed