【发布时间】:2017-07-26 08:26:50
【问题描述】:
我想在 Aurelia 中使用 Wickedpicker。我在 HTML 文件中添加了以下代码:
<require from="wickedpicker"></require>
<input type="text" name="timepicker" class="timepicker"/>
...
在 View-Model 我有这个代码:
import "wickedpicker"
.
.
constructor(){
let options = {
now: "12:35", //hh:mm 24 hour format only, defaults to current time
twentyFour: false, //Display 24 hour format, defaults to false
upArrow: 'wickedpicker__controls__control-up', //The up arrow class selector to use, for custom CSS
downArrow: 'wickedpicker__controls__control-down', //The down arrow class selector to use, for custom CSS
close: 'wickedpicker__close', //The close class selector to use, for custom CSS
hoverState: 'hover-state', //The hover state class to use, for custom CSS
title: 'Timepicker', //The Wickedpicker's title,
showSeconds: false, //Whether or not to show seconds,
timeSeparator: ' : ', // The string to put in between hours and minutes (and seconds)
secondsInterval: 1, //Change interval for seconds, defaults to 1,
minutesInterval: 1, //Change interval for minutes, defaults to 1
beforeShow: null, //A function to be called before the Wickedpicker is shown
afterShow: null, //A function to be called after the Wickedpicker is closed/hidden
show: null, //A function to be called when the Wickedpicker is shown
clearable: false, //Make the picker's input clearable (has clickable "x")
};
let timepicker = $('.timepicker').wickedpicker(options);
我通过 jspm (jspm install npm:wickedpicker) 安装了 wickedpicker,当我点击输入框时没有效果也没有错误。 你能帮帮我吗?
【问题讨论】:
标签: node.js aurelia timepicker wickedpicker