New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chakra-dayzed-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chakra-dayzed-datepicker

chakra + dayzed = datepicker

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
decreased by-35.48%
Maintainers
1
Weekly downloads
 
Created
Source

A Simple Chakra Datepicker based on Dayzed.

npm version Downloads

Every individual component is using Chakra UI. So it should respect all Chakra UI Configs without problem.

The componenent itself has to use some date library

Highly recommend just copy/paste the source code from /src to customize however you want.

Install the dependency

npm i date-fns dayzed
npm i chakra-dayzed-datepicker

Basic usage

Single

  const [date, setDate] = useState(new Date());
  
  <SingleDatepicker
    name="date-input"
    date={date}
    onDateChange={setDate}
  />

Range:

  const [selectedDates, setSelectedDates] = useState<Date[]>([new Date(), new Date()]);
  
  <RangeDatepicker
    selectedDates={selectedDates}
    onDateChange={setSelectedDates}
  />

propsConfigs:

dateNavBtnProps and dayOfMonthBtnProps extends from ButtonProps of Chakra-UI This allows you to override the default behavior however your want as long as supported by Chakra-UI.


Example:

  propsConfigs={{
    dateNavBtnProps: {
      colorScheme: "blue",
      variant: "outline"
    },
    dayOfMonthBtnProps: {
      borderColor: "red.300",
      selectedBg: "blue.200",
      _hover: {
        bg: 'blue.400',
      }
    },
    inputProps: {
      size: "sm"
    }
  }}

other props:

NameTypeDefault valueDescription
namestringundefinedname attribute for <input /> element
usePortalbooleanundefinedto prevent parent styles from clipping or hiding content

FAQs

Package last updated on 26 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc