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

ember-bootstrap-datetimepicker

v1.1.0

Published

Datetimepicker add-on for ember-cli

Downloads

1,090

Readme

Ember-bootstrap-datetimepicker Build Status

Datetimepicker add-on for ember-cli

Installation

ember install ember-bootstrap-datetimepicker

Generate blueprints

ember generate ember-bootstrap-datetimepicker

BREAKING CHANGE for Ember 2

There are some breaking-changes when using this addon > v0.4.1

Two-way bindings are replaced by data down, actions up (DDAU). See: http://emberjs.com/blog/2015/06/12/ember-1-13-0-released.html#toc_ember-2-0-beta

Before:

{{bs-datetimepicker date=mydate format='YYYY-MM-DD'}}

After:

{{bs-datetimepicker date=mydate format='YYYY-MM-DD' updateDate=(action (mut model.date2))}}

Basic Usage

Template

{{bs-datetimepicker date=mydate format='YYYY-MM-DD'}}

Brocfile.js

The twitter bootstrap resources will not be imported to your resources by default. If you want the add-on to add it you have to specify it in the ember-cli-build.js. (This options will be deprecated)

var app = new EmberApp(defaults, {
  'ember-bootstrap-datetimepicker': {
  "importBootstrapCSS": true,
  "importBootstrapJS": true,
  "importBootstrapTheme": true
  }
});

Building yourself

Check out the demo on github pages. Alternatively you can clone this repo and run the app

sudo npm install -g ember-cli
git clone https://github.com/plusacht/ember-bootstrap-datetimepicker.git
cd ember-bootstrap-datetimepicker
npm install; bower install
ember serve
  • Visit your app at http://localhost:4200.

General Options

All options supported offered by bootstrap-datetimepicker are supported

Bound Options

date

Type: Date

This variable will be changed when the user changes the date and on the other side it will update the datetime picker when "date" is updated

minDate

Type: Date

When you change this variable the component trigger an update to the minDate on the jQuery plugin.

maxDate

Type: Date

When you change this variable the component trigger an update to the maxDate on the jQuery plugin.

disabledDates

Type: Date

When you change this variable the component trigger an update to the disabledDates on the jQuery plugin.

enabledDates

Type: Array Date

When you change this variable the component trigger an update to the enabledDates on the jQuery plugin.

forceDateOutput

Type: Boolean

Forces the parameter to updateDate to be a native javascript Date instead of a moment.js Date.

placeholder

Type: String

Placeholder support when input field is blank

Usage

Min / Maxdate example

Define your model

var App.DateExample = Ember.Object.create({
  date1: moment(),
  mindate: moment("2014-11-01"),
  maxdate: moment("2015-12-01"),
  disabled:true});
}

Add the component to your template and bind the model.mindate with the component's minDate.

{{bs-datetimepicker date=date1 minDate=mindate maxDate=maxdate}}

Change minDate so the jquery plugin will be updated with the minDate value

App.DateExample.set('maxdate', moment("2015-03-01"));

Ember Compatibility

0.4.0 - 0.4.1

  • 1.11.3
  • 1.12.1
  • 1.13.3

Credits

This add-on is based on bootstrap-datetimepicker

Legal

plus8 gmbh © 2014-2015

Licensed under the MIT license