npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

datepicker-xyermik

v1.0.4

Published

A datepicker library

Downloads

2

Readme

Datepicker

The Datepicker UI-library consists of 3 different components: DatePicker, RangePicker and TodoPicker

The DatePicker components allows users to select any date from a calendar. It gives an ability to choose an option to highlight holidays or weekends with different colors. User can navigate between months and years using windows-like calendar interface to select a date. DatePicker also provides min and max date property, that a user can choose, so they cannot surpass the range of dates that they set.

The TodoPicker component is an extension to the DatePicker component that has a feature of writing todo-tasks for any selected date and save them even after browser closes. This allows users to store their todos on any date and be sure, that these todos will be saved for a long time. If needed, user can delete items pressing on "X" button.

The RangePicker component is an extension of the DatePicker, enabling users to select a range of dates. It provides a user-friendly way to choose a start and end date for specific time periods. This feature is particularly useful for tasks that require a duration, like booking accommodations or planning vacations. The RangePicker offers a seamless experience by highlighting the selected range and allowing users to easily modify it if needed.

Installation

yarn add datepicker-xyermik
# or
npm install datepicker-xyermik@latest

Import

import { DatePicker, TodoPicker, RangePicker } from "datepicker-xyermik"

Dependencies

Props

includeHolidays: boolean

The includeHolidays prop is a boolean that determines whether holidays should be highlighted in any Picker component. If true, the holidays will be highlighted and indicated with green color

<DatePicker includeHolidays={true} />

or

<DatePicker includeHolidays />

default: true

includeWeekends: boolean

The includeWeekends prop is a boolean that determines whether weekends should be highlighted in any Picker component. If true, the holidays will be highlighted and indicated with red color

<DatePicker includeWeekends />

default: true

theme: 'dark' | 'light'

The theme prop is a union of two string values that specifies the theme of chosen picker components. This prop allows user to choose theme of picker components.

<DatePicker theme="dark" />

default: 'dark'

min, max: string (dd.mm.yyyy)

The min and max props are string that define the range of possible dates that user can select from in DatePicker and TodoPicker components. The max string represents the latest date that can be selected, while the min string represents the earliest one. These props allow users to define a range of dates and throw errors if selected date is not in range.

<DatePicker min="01.01.2016" max="10.12.2024" />

default: ""

startOfWeek: 'Monday' | 'Sunday'

The startOfWeek prop is a union of 2 string values that determines the starting day of the week in any picker component. This prop allows to customize calendar interface depending on the week start day.

<DatePicker startOfWeek="Sunday" />

default: 'Monday'

value: string (dd.mm.yyyy)

The value prop is a string value in format of dd.mm.yyyy, which allows users to pass a default selected value to DatePicker and TodoPicker components.

<DatePicker value="04.05.2025" />

default: null

fromValue, toValue: string (dd.mm.yyyy)

The fromValue and toValue props are strings, that allow user to pass default date values to get the default date range for RangePicker component.

<DatePicker fromValue="05.02.2025" toValue="10.02.2025" />

default: fromValue - 01.01.2023, toValue - 05.01.2023

Project scripts

The scripts that are available in this projects:

yarn storybook

Runs storybook in development mode. Open http://localhost:4500 to view it in your browser.

The page will automatically reload when changes are made and saved

yarn build

Builds the library for production to the folder dist

yarn lint

Runs eslint to check for errors

yarn lint:fix

Runs ellint to check for errors and fix them automatically.

yarn test

Runs jest unit-tests.

yarn deploy-storybook

Runs deployment script to github-pages. It automatically build storybook to storybook-static folder and then uploads it to github-pages

Built with:

React

Typescript

Rollup

Storybook

Styled-components

Eslint

Babel

Jest

Yarn Berry

Husky

Prettier