API Docs for:
Show:

Ember.BuDatePicker

Extends Ember.Component
Module: bricksui-form
Parent Module: bricksui

Summary

Bootstrap时间日期选择插件,可配置的参数有

var options={
        minViewMode:null                //可选值为['months','years']纯月份选择/年选择
        viewMode:null                   //可选值为['months','years']纯月份选择/年选择
        pickDate: true,                 //是否启用日期选择
        pickTime: true,                 //是否启用事件选择
        useMinutes: true,               //是否启用分钟选择
        useSeconds: true,               //是否启用秒钟选择
        useCurrent: true,               //当useCurrent设置为true,该组件将默认选择当前日期
        minuteStepping:1,               //分钟间隔设置(可选择的分钟间隔)
        minDate:1/1/1900,             //最小可选择的时间
        maxDate: ,                      //最大的可选择事件(默认为当天 100年后)
        showToday: true,                 //shows the today indicator
        language:'en',                  //设置默认语言区
        defaultDate:"",                 //sets a default date, accepts js dates, strings and moment objects
        disabledDates:[],               //an array of dates that cannot be selected
        enabledDates:[],                //an array of dates that can be selected
        icons = {
               time: 'glyphicon glyphicon-time',
               date: 'glyphicon glyphicon-calendar',
               up:   'glyphicon glyphicon-chevron-up',
               down: 'glyphicon glyphicon-chevron-down'
           }
        useStrict: false,               //use "strict" when validating dates
        sideBySide: false,              //show the date and time picker side by side
        daysOfWeekDisabled:[]          //for example use daysOfWeekDisabled: [0,6] to disable weekends
   }

组件使用方式为

{{bu-datepicker value=value}}

Item Index

Properties

Methods

_parseOptions

Syntax

_parseOptions

() private

Summary

对传入的options参数进行解析,如果传入的参数类型为string,则尝试转换为字符串

_updateDom

Syntax

_updateDom

() private

Summary

在视图渲染完成后,设置datetimepick组件

attachI18nEvent

Syntax

attachI18nEvent

() private

Summary

监听全局I18n改变事件,在所选择的语言改变后,重新渲染视图

change

Syntax

change

() private

Summary

绑定原始值,在输入框内容发生改变时,更新Value的值

Properties

value

Syntax

value

Object

Summary

外部所绑定的值

Syntax

Unknown

Summary

默认配置文件,为准确完成日期格式转换,将进行严格日期校验 在所选择语言发生变化后,将进行视图重新渲染