我正在尝试从angular-ui.bootstrap配置datepicker,以便在用户弹出datepicker时有一个起点日期。
我发现这行代码确实有效。
$scope.date = new Date(1980-12-12);
它实际上将值放在输入框和拾取器上。但我希望我的输入框最初是空的。相反,我希望显示占位符。
答案 0 :(得分:0)
Please, try using the placeholder attribute.
Something like this
<input type="text" placeholder="{{date}}" ... />
答案 1 :(得分:0)
尝试使用占位符属性。
<input type="text" name="datepicker" placeholder="{{date}}" value="" ... />