在 ui.calendar 中设置日期
Set the date in the ui.calendar
有没有办法在 Webix 日历中以编程方式设置开始时间 date/select?
我只找到了两个方法,两个似乎都不令人满意。
date
属性 据我所知,它只显示初始年月,但不显示日期。日期对象仍然是 'null'
.
calendar.selectDate(new Date(year, month, day))
几乎是我所期望的:日期对象没问题,正确的日期是 selected。
但是。没有从当前月份到 selected 月份的重定向 - select 对用户不可见。
我错过了什么吗?真的有办法 select 约会并查看吗?
这是基本代码和 snippet:
var calendar = webix.ui({
view:"calendar",
date:new Date(2015,3,16) //months start from 0
});
calendar.selectDate(new Date(2016,3,25));
console.log(calendar.getSelectedDate())
终于找到
calendar.selectDate(new Date(2016,4,25), true); //has a second boolean parameter for showing the selected date
和
calendar.setValue(new Date(2016,4,25));
完成任务。
有没有办法在 Webix 日历中以编程方式设置开始时间 date/select?
我只找到了两个方法,两个似乎都不令人满意。
date
属性 据我所知,它只显示初始年月,但不显示日期。日期对象仍然是'null'
.calendar.selectDate(new Date(year, month, day))
几乎是我所期望的:日期对象没问题,正确的日期是 selected。
但是。没有从当前月份到 selected 月份的重定向 - select 对用户不可见。
我错过了什么吗?真的有办法 select 约会并查看吗?
这是基本代码和 snippet:
var calendar = webix.ui({
view:"calendar",
date:new Date(2015,3,16) //months start from 0
});
calendar.selectDate(new Date(2016,3,25));
console.log(calendar.getSelectedDate())
终于找到
calendar.selectDate(new Date(2016,4,25), true); //has a second boolean parameter for showing the selected date
和
calendar.setValue(new Date(2016,4,25));
完成任务。