Skip to Content
0

Validation issues when validating constraints in DataPicker

Jan 10, 2017 at 04:09 PM

30

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Melwyn Monis Jan 17, 2017 at 10:18 AM
0

Hi,

Any inputs ?

Regards,

Melwyn

Share
10 |10000 characters needed characters left characters exceeded