1.3.0 • Published 2 years ago

@maiconleffa/date-range-picker v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago