DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Vue Range Selector - Background Image

This demo demonstrates how to customize the RangeSelector appearance by specifying an image as a background view.

Backend API
<template> <DxRangeSelector id="range-selector" v-model:value="range" title="Select a Time Period" > <DxMargin :top="50" :bottom="0" /> <DxBackground> <DxImage url="../../../../images/RangeSelector/background.png" location="full" /> </DxBackground> <DxIndent :left="65" :right="65" /> <DxSliderMarker :placeholder-height="30" format="shorttime" /> <DxScale :start-value="startValue" :end-value="endValue" :placeholder-height="20" > <DxTickInterval :hours="2"/> <DxMinorTickInterval :hours="1"/> <DxLabel format="shorttime"/> </DxScale> </DxRangeSelector> </template> <script setup lang="ts"> import { ref } from 'vue'; import { DxRangeSelector, DxMargin, DxBackground, DxImage, DxIndent, DxSliderMarker, DxScale, DxTickInterval, DxMinorTickInterval, DxLabel, } from 'devextreme-vue/range-selector'; const startValue = ref(new Date(2012, 8, 29, 0, 0, 0)); const endValue = ref(new Date(2012, 8, 29, 24, 0, 0)); const range = ref([new Date(2012, 8, 29, 11, 0, 0), new Date(2012, 8, 29, 17, 0, 0)]); </script> <style> #range-selector { height: 300px; } </style>
import { createApp } from 'vue'; import App from './App.vue'; createApp(App).mount('#app');
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> <link rel="stylesheet" type="text/css" href="./bundle.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"> </div> </div> <script src="bundles/vendor/vue.vendor.js"></script> <script src="./bundle.js"></script> </body> </html>