Giter Club home page Giter Club logo

ember-cli-bootstrap-datetimepicker's Introduction

ember-cli-bootstrap-datetimepicker

Date and time picker addon based on bootstrap. It uses bootstrap-datetimepicker and moment.js.

Requirements

  • Bootstrap 3
  • Ember >= 1.13.0
  • Ember CLI

Installation

ember install ember-cli-bootstrap-datetimepicker

Demo

For demonstration see bootstrap-datetimepicker

Usage

Basic example:

{{bs-datetimepicker date=myDate}}

Available actions

change

Returns: date, null

Fired when the date is changed

Available options

date

Default: false

Accepts: date, moment, string

{{bs-datetimepicker date=myDate}}

Sets the picker date/time

focusOnShow

Default: true

Accepts: boolean

{{bs-datetimepicker date=myDate focusOnShow=false}}

If false, the textbox will not be given focus when the picker is shown

format

Default: false

Accepts: strint

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

See momentjs' docs for valid formats. Format also dictates what components are shown, e.g. MM/dd/YYYY will not display the time picker.

locale

Default: moment.locale()

Accepts: string, moment.local('locale')

{{bs-datetimepicker date=myDate locale='de'}}

Use the specified locale for text rendering

maxDate

Default: false

Accepts: date, moment, string

{{bs-datetimepicker date=myDate maxDate=myMaxDate}}

Prevents date/time selections after this date

minDate

Default: false

Accepts: date, moment, string

{{bs-datetimepicker date=myDate minDate=myMinDate}}

Prevents date/time selections before this date

showClear

Default: false

Accepts: boolean

{{bs-datetimepicker date=myDate showClear=true}}

Show the Clear button in the icon toolbar. Clicking the Clear button will set the calendar to null.

showClose

Default: false

Accepts: boolean

{{bs-datetimepicker date=myDate showClose=true}}

Show the Close button in the icon toolbar. Clicking the Close button will call hide()

showTodayButton

Default: false

Accepts: boolean

{{bs-datetimepicker date=myDate showTodayButton=true}}

Show the Today button in the icon toolbar. Clicking the Today button will set the calendar view and set the date to now.

useCurrent

Default: false

Accepts: bolean, 'year', 'month', 'day', 'hour', 'minute'

{{bs-datetimepicker date=myDate useCurrent='day'}}

If the date is not set, the first time the widget opens will set the date to current moment (if true). Granularity can be specified as a string.

viewMode

Default: days

Accepts: 'years', 'months', 'days'

{{bs-datetimepicker date=myDate viewMode=false}}

The default view to display when the picker is shown. Note: To limit the picker to selecting, for instance the year and month, use format: MM/YYYY

License

MIT License

ember-cli-bootstrap-datetimepicker's People

Contributors

btecu avatar geoffroyw avatar ember-tomster avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.