RangeSelector - Date Scale

React RangeSelector: Date Scale

Data scale in React RangeSelector.

A live React example of jqxRangeSelector, the jQWidgets RangeSelector component, with its complete source code below. It is one of 12 jqxRangeSelector demos for React.

jqxRangeSelector API used in this demo

Source code

To run it in your own app, install the package with npm install jqwidgets-scripts, add these files to a Vite React and TypeScript project, and import jqx.base.css and a theme in main.tsx. Getting started with jqxRangeSelector shows the setup step by step.

App.tsx

import type { JSX } from 'react';
import { useMemo } from 'react';
import JqxRangeSelector from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxrangeselector';

interface DateRange {
    from: Date;
    to: Date;
}

function App(): JSX.Element {
    const min = useMemo(() => new Date(2025, 11, 31), []);
    const max = useMemo(() => new Date(2026, 11, 30), []);
    const range: DateRange = useMemo(
        () => ({ from: new Date(2026, 3, 14), to: new Date(2026, 7, 28) }),
        []
    );

    return (
        <JqxRangeSelector
            theme="tailwind-blue-dark"
            width="100%"
            height={100}
            min={min}
            max={max}
            range={range}
            labelsOnTicks={false}
            majorTicksInterval="month"
            minorTicksInterval="day"
            labelsFormat="MMM"
            markersFormat="d"
        />
    );
}

export default App;

Learn more

More React RangeSelector demos