DatePicker (index.tsx)

react-datepicker · ui, date-picker, calendar-component, input-cloning, class-combining

UI calendar/date picker component. Renders from input, combines class names, clones element.

// Source: https://github.com/Hacker0x01/react-datepicker | License: MIT | Copyright 2014-2025 HackerOne Inc and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { clsx } from "clsx";
import React, { Component, cloneElement } from "react";

import Calendar, { OUTSIDE_CLICK_IGNORE_CLASS } from "./calendar";
import CalendarIcon from "./calendar_icon";
import {
  newDate,
  isDate,
  isBefore,
  isAfter,
  isEqual,
  setTime,
  isValid,
  getSeconds,
  getMinutes,
  getHours,
  addDays,
  addMinutes,
  addMonths,
  addWeeks,
  subDays,
  subMonths,
  subWeeks,
  addYears,
  subYears,
  isDayDisabled,
  isDayInRange,
  getEffectiveMinDate,
  getEffectiveMaxDate,
  parseDate,
  parseDateForNavigation,
  formatDate,
  safeDateFormat,
  safeDateRange

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key