Ticket #314 (closed task: fixed)

Opened 3 years ago

Last modified 3 years ago

(Default) validation of field type 'date-range'

Reported by: sdm Owned by: mpo
Priority: major Milestone: 0.4
Component: modules/kauri-forms Version:
Keywords: date-range validation Cc: kauri-discuss@…

Description

With a date-range, you can enter a start and end date, but there is no validation that checks if the start date <= end date. I think it would be a nice enhancement to the date-range if this validation was present by default.

This issue was also discussed in http://groups.google.com/group/kauri-discuss/browse_thread/thread/bd529655c0c33b05#

Change History

comment:1 Changed 3 years ago by mpo

  • Milestone changed from 0.4 to 0.4.1

comment:2 Changed 3 years ago by jgou

  • Milestone changed from 0.4.1 to 0.4

comment:3 Changed 3 years ago by karel

  • Status changed from new to closed
  • Resolution set to fixed

(In [1742]) Added dateRangeOrder validator

fixes #314

It should be noted that this does not enforce that both fields are filled in:
2010-01-01/undefined and undefined/2010-01-01 are not invalid ranges for this validator

comment:4 Changed 3 years ago by karel

See #382 for making start/end date required.

comment:5 Changed 3 years ago by karel

  • Status changed from closed to reopened
  • Resolution fixed deleted

Reopened: rather than adding a validation, we should also provide the
more user-friendly variant: swapping the dates if they are in the wrong order.
(hint: use normalizeValue)

comment:6 Changed 3 years ago by karel

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [1765]) Date range control: finishing touches

  • allow automatic ordering (ascending / descending / none) - default is ascending
  • removed dateRangeOrder from sample (it's never invalid because of the automatic ordering)

fixes #314

Note: See TracTickets for help on using tickets.