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

@vatsalmewada/time_range_slider

v1.0.6

Published

Slider for changing time range in inputs.

Downloads

11

Readme

Time Range Slider

Time Range Slider makes it easier to handle time ranges.

Prerequisites

This package depends on jQuery, so it's most useful in a project where you are already using jQuery.

Installation

Inside your project environment in your terminal run the following:

npm i @vatsalmewada/time_range_slider

then you should add

require("jquery")
require("@vatsalmewada/time_range_slider")

Basic Usage

Suppose you have a div element with class time_range_slider:

<div class='time_range_slider'></div>

to apply this plugin on your div, you need to add following line to your script:

$('.time_range_slider').time_range_slider();

Your div will look something like this

Applied time range slider on div

Now, to show the values of this range slider we need two textboxes. One is for Start time and another for End time.

<div class='time_range_slider'></div>

<input type="text" class="start_time_input"/>
<input type="text" class="end_time_input"/>

and then apply time_range_slider,

$('.time_range_slider').time_range_slider();

Applied time range slider on div

Plugin Properties

Name | Description -----------------|------ main_sel | To put custom class name as a selector for main div start_time_sel | To put custom class name as a selector for start_time input end_time_sel | To put custom class name as a selector for end_time input start_time | To put default start_time. e.g. 6:30 end_time | To put default end_time. e.g. 17:00

Examples

$( ".vatsal" ).time_range_slider({
    main_sel: '.vatsal',                 // For custom `main div`
    start_time_sel: '.start_time_input', // For custom `start_time input`
    end_time_sel: '.end_time_input',     // For custom `end_time input`
    start_time: '6:30',                  // For custom `start_time`
    end_time: '17:00',                   // For custom `end_time`
});

Copyright

Copyright (c) 2022 Vatsal Mewada. See LICENSE for details.