Prime React calendar : range and multiple mode support for Month and year Picker

15 views Asked by At

I am using Prime react calendar date range in one of my project, but when i enable multiple mode with range selection monthpicker and yearpicker not working.

import React, { useState } from 'react';
import { Calendar } from 'primereact/calendar';

export default function RangeDemo() {
  const [dates, setDates] = useState(null);

  return (
    <div className="card flex justify-content-center">
      <Calendar
        value={dates}
        onChange={(e) => setDates(e.value)}
        selectionMode="range"
        readOnlyInput
        numberOfMonths={2}
      />
    </div>
  );
}

when i try to use yearpicker and monthpicker option, only first monthpicker is working in the date range other monthpicker dropdown not coming.

0

There are 0 answers