Vue DateRangeBox - Control the Behavior
The DateRangeBox UI component allows users to type dates or pick them from a dropdown. The dropdown can display a single-month or two-month calendar. To use a single-month calendar, disable the multiView option. You can also specify whether date selection should take effect instantly or after a user clicks Done. Use the applyValueMode property.
App.vue (Options API)
App.vue (Composition API)
- <template>
- <DxDateRangeBox
- :multi-view="false"
- apply-value-mode="useButtons" // or "instantly"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.fluent.blue.light.css';
- import DxDateRangeBox from 'devextreme-vue/date-range-box';
- export default {
- components: {
- DxDateRangeBox
- },
- }
- </script>
- <template>
- <DxDateRangeBox
- :multi-view="false"
- apply-value-mode="useButtons" // or "instantly"
- />
- </template>
- <script setup>
- import 'devextreme/dist/css/dx.fluent.blue.light.css';
- import DxDateRangeBox from 'devextreme-vue/date-range-box';
- // ...
- </script>