Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

blank item entry

$
0
0

how can I add a blank item at the top of TimePicker list?

 

My code looks like this,

 

function timeEditor(container, options) {
            $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
                    .appendTo(container)
                    .kendoTimePicker({
                        //interval: 15
                        //max: new Date(2000, 0, 1, 22, 0, 0) //date part is ignored
                        //min: new Date(2000, 0, 1, 8, 0, 0) //date part is ignored
                    });
        }

        $("#HoursGrid").kendoGrid({
            dataSource: {
                data: @Html.Raw(Json.Encode(Model.HoursList)),
                schema: {
                    model: {
                        fields: {
                            DealerID: {type: "int", editable: false},
                            dayNo: {type: "int", editable: false},
                            dayName: { type: "string", editable: false },
                            OpenTime: { type: "date", editable: true },
                            CloseTime: { type: "date", editable: true }
                        }
                    }
                }
            },
            //toolbar: ["save"],
            columns:[
                {   field: "dayName",          title: "Day of Week"   },
                {   field: "OpenTime",    title: "Sales Hours - Open From",  type: "date", format: "{0:hh:mm tt}", editor: timeEditor  },
                {   field: "CloseTime",   title: "Close At",                 type: "date", format: "{0:hh:mm tt}", editor: timeEditor  }
            ],
            editable: true,
            scrollable: false,
            save: function(e){
            },
            databound: DD.Kendo.AddExtraStyleToGrid // this is where the hover effect function is bound to grid
        });


Viewing all articles
Browse latest Browse all 99250

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>