Skip to Content

Validation issues when validating constraints in DataPicker

Hi,

I have a DatePicker control in a XML view defined as follows:

<DatePicker id="colDateTo" required="true" 
	value="{ path: 'Periode to',
	type: 'sap.ui.model.type.Date',
		formatOptions: {
			pattern: 'dd.MM.yyyy'
		},
		constraints : {
			minimum : '01.01.2000',
			maximum : '31.12.9999'
		}
}"/> 

I am doing validation based on the constraints.

I noticed that when the datepicker field is empty/blank it reports the field as an error which is fine.

If I enter a date less than 01.01.2000 e.g. 12.05.1985 it accepts this input and it seems the minimum constraint is not considered and the validation error is not shown.

Any idea how to ensure that the minimum constraint check is triggered even if a wrong date is entered that violates the constraint?

Regards,

Melwyn

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 17, 2017 at 10:18 AM

    Hi,

    Any inputs ?

    Regards,

    Melwyn

    Add comment
    10|10000 characters needed characters exceeded