1.3.0 • Published 1 year ago

@maiconleffa/date-range-picker v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

DateRangePicker

DateRangePicker is a simple component to get a range of dates, it returns start date and end date.

Captura de Tela 2024-03-13 às 21 17 08

import { DateRangePicker } from "@maiconleffa/date-range-picker";

export function Demo() {
  function handleChange(dateRange) {
    console.log(dateRange)
  }

  return (
    <div>
      <DateRangePicker onChange={handleChange} />
    </div>
  );
};

Props | Prop | Default | Description | | :---: | :---: | :---: | | onChange | - | Event when apply button is pressed | | disableFuture | false | If true user can not selected dates after today date | | maxRange | 366 | The amount of days in between two dates that user can select | | value | null | The current value of the component | | waitForApply | true | If true onChange event is trigger only when apply button is pressed | | applyButton | 'Apply' | Text inside apply button | | cancelButton | 'Cancel' | Text inside cancel button |

onChange { startAt: Date Object, endAt: Date Object }

1.3.0

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago