React Date Range Input Component Styling

Date Range Input Styling

CoreUI PRO
This component is part of CoreUI PRO – a powerful UI library with over 250 components and 25+ templates, designed to help you build modern, responsive apps faster. Fully compatible with Angular, Bootstrap, React.js, and Vue.js.

Learn how to customize the React Date Range Input component with CSS classes, variables, and Sass for flexible styling and seamless integration into your design.

On this page

CSS variables

The two ends are date inputs, so they carry the form-date-time tokens, and the frame around them carries the form control group ones. The range adds no tokens of its own.

scss
// Redeclaring a --cui-control-* token here would shadow `.form-control`
// on the same element, and with it the validation states.
$form-date-time-tokens: () !default;
$form-date-time-tokens: defaults(
  (
    --cui-form-date-time-placeholder-color: var(--cui-fg-3),
    --cui-form-date-time-section-border-radius: .25rem,
    --cui-form-date-time-section-focus-bg: var(--cui-primary-bg-subtle),
  ),
  $form-date-time-tokens
);