lforms icon indicating copy to clipboard operation
lforms copied to clipboard

maxValue for type date

Open Harown opened this issue 1 year ago • 2 comments

Hello,

I tried to set the maxValue extension for a date field to no avail: https://jsfiddle.net/ky0gs3tn/1/

Is maxValue for date not (yet) supported?

As a workaround I tried to add the nzDisabledDate attribute to the nz-date-picker element like nzDisabledDate={d => d.isAfter('2022-12-31')} but since the date picker is already rendered this has also no effect.

Any other possibility to set a max date?

Harown avatar Jun 19 '23 09:06 Harown

No, it seems we only support maxValue on integer and decimal. Also, I can't think of another option. (Well, you could use questionnaire-constraint, but we don't support that either yet.) I've added an internal tracker item for it. Please let me know how critical this is for you. We have a number of fixes and features in process, including R5 support.

plynchnlm avatar Jun 21 '23 21:06 plynchnlm

Thanks. That's not critical. We even made questionnaire-constraints work by using fhirpath so it's a good idea to implement it that way. 🙂

Harown avatar Jun 22 '23 07:06 Harown