我正在使用具有datetimepicker作爲每行中的列的kendo網格。如何使用AngularJs在KendoDateTimePicker中設置日期選擇器的最小/最大值使用AngularJs
datetimepicker應該只允許用戶選擇昨天和今天的日期和時間是靈活的。
我試過很多方法,但是我無法完成。
我的網格列是 -
{ field: "Fac", title: "Fac Name", width: "100px", editor: $scope.facDropDownEditor, template: "#=(FacFacyName==null)? '' : Fac.FacName #" },
{ field: "RecordedDate", title: "Date - Time", format: "{0:yyyy-MM-dd HH:mm}", editor: dateTimeEditor, width: "100px" },
{ field: "Remarks",title:"Remarks",width:"120px"},
{ field: "Volume", title: "Volume", width: "100px" },
{
command: [
{
name: "edit", title: "Edit", "template": "<a class='k-button k-grid-edit' href='' style='min-width:40px;' title=\"Edit\"><span class='k-icon k-i-edit'></span></a>"
},
], field: "Actions",title:"Actions", width: "60px"
}
我datetimeEditor是 -
function dateTimeEditor(container, options) {
$('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
.appendTo(container)
.kendoDateTimePicker({});
}
如何編輯日期選擇器,這樣我只能得到今天和昨天的日期可選
到這裏看看: http://demos.telerik.com/kendo-ui/datepicker/disable-dates 反向這一點,所以你只能選擇上定義的,應該是很簡單的具有可選日期數組。 – Adriani6
http://docs.telerik.com/kendo-ui/controls/editors/datepicker/how-to/AngularJS/range-selection。我希望你可以按照例子使用k-min和k-max。 –
最大日期是工作正常,但我沒能得到MINDATE截至昨日 –