codecamp

Angular EasyUI 日期框

日期框( DateBox )把可编辑的文本框和下拉日历面板结合起来。 日期框( DateBox )在文本框中输入的字符串可被转换为有效日期。被选择的日期也可以被转换为期望的格式。

属性列表

名称 数据类型 作用描述 默认值
value Date 字段值。 null
selection Date 选中的日期。 null
format string 日期格式。 MM/dd/yyyy

字段列表

名称 类型 作用描述
calendar CalendarComponent 下拉日历组件。

事件列表

名称 参数 作用描述
selectionChange Date 更改选择时触发。

注:
- 继承: ComboBaseComponent 。
- 选择器: eui-datebox 。

使用方法

<div style="margin-bottom:20px">
    <label [for]="d1" align="top">Default Format</label>
    <eui-datebox #d1 [(ngModel)]="value"></eui-datebox>
</div>
<div style="margin-bottom:20px">
    <label [for]="d2" align="top">yyyy-MM-dd</label>
    <eui-datebox #d2 [(ngModel)]="value" format="yyyy-MM-dd"></eui-datebox>
</div>
Angular EasyUI 单选框
Angular EasyUI 时间微调框
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Angular EasyUI 教程总览

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }