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

How to convert yyyy-MM-ddTH:mm:ss.fffZ to date picker

$
0
0
My column can have the different values (date, number, options of dropdown box, etc). Grid includes

columns: [
                { field: "value", title: "Value", editor: cellEditor },                 
            ],
And my

function cellEditor(container, options) {
       …     
var type = dataItem.type;        

if( type=="NUMBER" ){     
              $('<input data-bind="value:' + options.field + '"/>')
             .appendTo(container)
              .kendoNumericTextBox({     spinners : true });

       } else if( type=="DATE" ){
              $('<input data-text-field="' + options.field + '" data-bind="value:' + options.field + '" data-value-field="' + options.field +'" data-format="{0:MM/dd/yyyy}"/>')
             .appendTo(container)                 
              .kendoDatePicker({close: function(e) {
e.preventDefault();
             }});

       }


My value for date is “MM/dd/yyyy” string. And your date picker can properly parse it during loading. But when editing’s done I see not desired string Tue Oct 30 2007 00:00:00 GMT-0400 (Eastern Daylight Time)

How can I format it to original “MM/dd/yyyy” string to show in the grid when editing is done? Should I override something or you have a hook like complete: function(e) {}?

Best regards,
Igor

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>