DevExtreme Vue - Specify Value Range

To specify the date or time range, use the min and max options.

App.vue
  • <template>
  • <DxDateBox
  • value="2015/12/31"
  • type="date"
  • min="2015/1/1"
  • max="2015/12/31"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import DxDateBox from 'devextreme-vue/date-box';
  •  
  • export default {
  • components: {
  • DxDateBox
  • }
  • }
  • </script>

If an entered value falls out of the range, the widget displays an error message. To change the message text, specify the dateOutOfRangeMessage option.

See Also