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

edtimepicker

v1.0.9

Published

Mobile responsive time picker for React

Downloads

39

Readme

EDTimePicker

EDTimePicker is a responsive, mobile-friendly date and time picker component for React applications.

Features

  • Responsive design for mobile and desktop
  • Easy integration with React projects
  • Customizable options for date and time selection

Demo

Demo

Installation

You can install EDTimePicker via npm:

npm install edtimepicker

Usage

Here's a basic example of how to use the EDTimePicker component in your React application:

import React from 'react';
import EDTimePicker from 'edtimepicker';


function App() {
   const [date, setDate] = useState("03-10-2019 23:00");

   function onTimeChanged(newDate){
      // ... do something
   }
   return (
      <div className="App">
         <h1>Example Usage of EDTimePicker</h1>
         <EDTimePicker
            currentDate = {date} // set Date and Time. #default: new Date();
            options = {{
               borderColor: "#ff0000",
               daysNameFormat: "DDDD, MMM DD",
               timeFormat: "hh:mm A" // or "HH:mm" for 24 hour format
               //.... and more
            }}
            onDateChange = {onTimeChanged}
         />
      </div>
   );
}

export default App;

Options and Defaults

EDTimePicker provides several customizable options, allowing you to tailor its functionality to your needs. Below are the available options and their default values:

Detailed Options

  • minutesStep: Defines the step interval for minutes selection.

    • Default: 15
  • viewItems: Number of items visible in the picker wheel.

    • Default: 3
  • itemHeight: Height of each item in the picker wheel.

    • Default: 40
  • daysNameWheel: Whether to show days names in a wheel format.

    • Default: true
  • daysNameFormat: Format for displaying the day names.

    • Default: "DDDD, MMM DD"
    • DDDD - full day name. exp: Sunday
    • DDD - short day name. exp: Sun
    • DD - day of month with 0. exp: 03 or 24
    • D - day of month without 0. exp: 3 or 24
    • MMMM - full month name. exp: August
    • MMM - short month name. exp: Aug
    • MM - month number with 0. exp: 08
    • M - month number without 0. exp: 8
    • YYYY - Full Year. exp: 2029
    • YY - las 2 digit of Year. exp: 29
    • HH - Hour with 0 in 24 hour format. exp: 08 or 19
    • H- Hour without 0 in 24 hour format. exp: 8 or 19
    • hh - Hour with 0 in 12 hour format. exp: 08 AM or 07 PM
    • h- Hour without 0 in 12 hour format. exp: 8 AM or 7 PM
    • mm - minutes with 0. exp: 09 or 22
    • m - minutes without 0. exp: 9 or 22
  • timeFormat: Format for displaying the time.

    • Default: "hh:mm A"
  • dateWheelsFormat: Format for displaying the date wheels.

    • Default: "MMMM|DD|YYYY"
  • showTime: Determines whether the time picker is visible.

    • Default: true
  • showDate: Determines whether the date picker is visible.

    • Default: true
  • borderColor: Color of the picker border.

    • Default: "#2867f9"
  • addClass: Additional CSS class for customization.

    • Default: ""
  • textAlign: Alignment of the text in the picker.

    • Default: "left"

Methods

  • onDateChange: Callback function triggered on date change. Return new Date();

JQUERY version

To get Jquery version please Visit our website

Contributing

We welcome contributions to improve EDTimePicker! If you'd like to contribute, please fork the repository and submit a pull request.

License

EDTimePicker is licensed under the MIT License. See the LICENSE file for more details.