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

zvelte-datepicker

v2.0.2

Published

A datepicker fork from the version 2.0.4 of https://github.com/6eDesign/svelte-calendar with time selection fonctionality

Downloads

15

Readme

zvelte-datepicker

A datepicker fork from the version 2.0.4 of https://github.com/6eDesign/svelte-calendar with time selection fonctionality

Installation

npm i -D zvelte-datepicker

Basic usage

<script>
  import Datepicker from 'zvelte-datepicker';
</script>

<Datepicker start={minDate} end={maxDate} />

Props

prop name | type | default ---------------------|------------------------|------------------------- start | date | one year in past end | date | one year in future selected | date | today formattedSelected | string | today dateChosen | boolean | false withTime | boolean | false selectableCallback | function | null format | string | function | '#{m}/#{d}/#{Y}' locale | string | En-US Locale (see below) style | string | ""

start and end

These properties set the minimum and maximum dates that will be rendered by this calendar. It is recommended that you do not leave these as their defaults and supply values which suit your application's needs.

selected and formattedSelected

Bind to these properties to observe the selected date as either a date or a string. Use selected to set the day which is selected by default.

dateChosen

Bind to this property to observe whether a user has selected a day.

withTime

Boolean to enable time selection

selectableCallback

Provide a function which accepts a date and returns a boolean determining whether a day between start and end is selectable. For example, use this to prevent weekend days from being selected.

format

Date formatting uses [timeUtils] formatting (MM/DD/YYYY by default). If you would like to use a different formatting library, supply a function which accepts a date and returns a string.

locale

This prop is used to internationalize the calendar.

<Datepicker bind:formattedSelected={selectedDateFormatted} bind:selected={selectedDate} bind:dateChosen={userHasChosenDate} start={threeDaysInPast} end={inThirtyDays} selectableCallback={filterWeekends} withTime={true} locale='fr' format={date => dayjs(date).format('DD/MM/YYYY')} />


## Developing/Modifying Svelte-Calendar Guide

*Note that you will need to have [Node.js] installed.*

Install the dependencies...

```bash
cd zvelte-datepicker
npm install

...then start [Rollup]:

npm run dev

Navigate to [localhost:3000]. You should see your app running. Edit a component file in src, save it, and your browser will reload the page so you can see your changes automatically.