How to specify constraints for sap.m.DatePicker?

Viewed 2585

This is how we specify minimum / maximum constraint for DatePicker within controller.js. But how to do this within XML view?

Below code within XML is not working.

<DatePicker id="dp" value="{
  path: '/val',
  type:'sap.ui.model.type.Date',
  formatOptions: {
    pattern: 'yyyy-MM-dd',
    strictParsing: 'true'
  },
  constraints: {
    minimum: '/min',
    maximum: '/max'
  }
}" />
1 Answers
Related