hello
RelativeDateItem has a bug in it, where the validators doesn't operate correctly
(show an error as if validation failed) if date picked relatively.
Repro code: (class and surroundings removed for brevity)
DynamicForm form = new DynamicForm();
DateRangeValidator dateRange = new DateRangeValidator();
dateRange.setMin(new Date());
RelativeDateItem relativeDateItem = new RelativeDateItem();
relativeDateItem.setValidators(dateRange);
relativeDateItem.setValidateOnChange(true);
relativeDateItem.setName("rdi");
relativeDateItem.setTitle("Pick a date");
form.setFields(relativeDateItem);
form.draw();
now pick a date relatively (e.g. N weeks from now) and you'll get an error
i haven't been able to create a workaround as even the onChanged event isn't fired when date picked relatively (another bug in my opinion)
p.s.
I'm not sure if this is the place to report this, but i haven't been able to find anywhere else to put these
Thanks,
Nadav.
RelativeDateItem has a bug in it, where the validators doesn't operate correctly
(show an error as if validation failed) if date picked relatively.
Repro code: (class and surroundings removed for brevity)
DynamicForm form = new DynamicForm();
DateRangeValidator dateRange = new DateRangeValidator();
dateRange.setMin(new Date());
RelativeDateItem relativeDateItem = new RelativeDateItem();
relativeDateItem.setValidators(dateRange);
relativeDateItem.setValidateOnChange(true);
relativeDateItem.setName("rdi");
relativeDateItem.setTitle("Pick a date");
form.setFields(relativeDateItem);
form.draw();
now pick a date relatively (e.g. N weeks from now) and you'll get an error
i haven't been able to create a workaround as even the onChanged event isn't fired when date picked relatively (another bug in my opinion)
p.s.
I'm not sure if this is the place to report this, but i haven't been able to find anywhere else to put these
Thanks,
Nadav.
Comment