我在我們的應用程序中使用Kendo UI DatePicker控件,我想刪除應用於觸發datepicker顯示輸入的樣式。Kendo UI DatePicker,刪除輸入樣式
當我初始化我的日期選擇器是這樣的:
$('.datepicker').kendoDatePicker();
的.datepicker
元件,其是一個input type='text'
是由一些元件包裹,使得小日曆圖標就會出現。
<span class="k-widget k-datepicker k-header form__field box__filterlight__field datepicker">
<span class="k-picker-wrap k-state-default">
<input placeholder="from" class="form__field box__filterlight__field datepicker k-input" data-role="datepicker" type="text" role="combobox" aria-expanded="false" aria-disabled="false" aria-readonly="false" style="width: 100%;" aria-activedescendant="8beab73f-332b-45a7-8f0b-4a6c3faafcd6_cell_selected">
<span unselectable="on" class="k-select" role="button">
<span unselectable="on" class="k-icon k-i-calendar">select</span>
</span>
</span>
</span>
但我想完全控制它,只是有日曆的樣式。理想情況下禁用包裝Kendo UI會這樣做標記將保持如下狀態:
<input placeholder="from" class="form__field box__filterlight__field datepicker k-input" data-role="datepicker" type="text" role="combobox" aria-expanded="false" aria-disabled="false" aria-readonly="false" style="width: 100%;" aria-activedescendant="8beab73f-332b-45a7-8f0b-4a6c3faafcd6_cell_selected">
有沒有辦法做到這一點?我看了看文檔,似乎沒有辦法禁用包裝。
如果我們手動刪除包裝,沒有辦法禁用包裝,那麼可能有些功能不可行。 –