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

flexya-date-time-picker

v1.0.2

Published

A jQuery widget for Flexya's calendar services

Downloads

59

Readme

flexya-date-time-picker

Copyright (c) 2017 Flexya A/S

About

flexya-date-time-picker is a jQuery plugin which interfaces with Flexya's calendar services. It creates a calendar widget which makes it simple for your users to select available dates and times from your calendars.

Installation

The installation files can be downloaded as a zip file from this project's release page on github, or installed using npm. The files in the npm installation's dist folder are the same as those found on the github release page. The files include a single css and js file, along with corresponding minified versions, and then finally a source map for each file.

Once the files are downloaded, they can be included in your project in various ways:

You can use them directly in your html:

<link rel="stylesheet" href="flexya-date-time-picker.min.css">
<script src="flexya-date-time-picker.min.js"></script>

Or, if you're using a module bundler like webpack, you can require them directly into your project:

require('flexya-date-time-picker');

Usage

flexya-date-time-picker works just like any other jQuery widget. Simply select an input element and then call the plugin's method with options:

$('input[name="date"]').flexyaDateTimePicker(options);

The available options, as well as their default values, are as follows:

{
	// The url which is used for retrieving calendar data.  Since the calendar
	// API currently does not support CORS, you will need to proxy to your own
	// service to provide credentials.
	"url": "https://service.boligsystem.flexya.dk/service/v20/calendar/list",
	
	// If the calendar is tied to a specific case, rather than a global
	// calendar, then the case key should be provided here.
	"caseKey": null,
	
	// The size of a time slot on the time picker.
	// Defaults to 15 minutes (900000 milliseconds).
	"calendarInterval": 900000,
	
	// The locale used by the calendar, for displaying dates, times, etc.
	"locale": "da-DK"
	
	// Indicates where the widget should appear relative to its host control.
	// Valid values are "above" or "below".
	"location": "below"
}

Locales can be implemented by adding a locale definition to the plugin's list of locales:

$.fn.flexyaDateTimePicker.locales['my-locale-name'] = {
	// ... locale definition ...
};

See the default locales included in the project to see the locale definition format.

Customization

Due to the complexity of the widget, it may be difficult to customize the look and feel by overriding the css. The easiest way to customize the widget would be by using scss, overriding the following variables, and then compiling to css yourself:

// The background color of the entire widget.
$background-color: white;

// The background color of days and times which are "unavailable".
$unavailable-background-color: #eee;

// The text color of days outside the current month.
$adjacent-color: #999;

// The margin used by various components within the widget.
$widget-margin: 1rem;

// The border properties of the entire widget.
$widget-border-thickness: 1px;
$widget-border-color: #888;
$widget-border-pattern: solid;

// The border properties of a selected/hovered day or time.
$selection-border-thickness: 2px;
$selection-hover-border-color: #3bf;
$selection-selected-border-color: #9d3;
$selection-selected-unavailable-border-color: #d88;
$selection-border-pattern: solid;

License

flexya-date-time-picker is licensed under the MIT License. See license.md.