JSFiddle

  • Kendo DatePicker changes

    jQuery 1.8.3, HTML, CSS, JavaScript

    function onChange() {
        if (datePicker.value() == null) {
            datePicker.value(new Date());
        }
        var selectedValue = datePicker.value();
        var monthValue = kendo.toString(selectedValue, "MM ...
  • Resize absolutely positioned columns with transitions

    jQuery 1.8.3, HTML, CSS, JavaScript

     // LESS shim for JSFiddle
    (function(){ 
        $('head style[type="text/css"]').attr('type', 'text/less');
        less.refreshStyles(); 
        $('body').fadeToggle();
    })()
    
    var hide1 ...
  • Kendo UI validator position examples #10 is the latest revision

    jQuery 1.8.3, HTML, CSS, JavaScript

    // register an additional custom message locator  
    $.extend(kendo.ui.validator, {
         messageLocators: {
             customLocator: {
                 locate: function(element, fieldName) {                           
                     //return the element in ...
  • CSV file handling

    jQuery 1.8.3, HTML, CSS, JavaScript

    var result = { columns: [], sampleRow: [] };
    
    /* File Functions ---------- */
    var searchStringInArray = function(str, strArray) {
        for (var j=0; j<strArray.length; j++) {
            if (strArray[j].match(str)) return j;
        }
        return -1;
    }
    
    var verifyFile = function(file) {
        var returnObj = { result: false, message: "" };
        var types = [
            "application/csv",
            "application/excel",
            "application/vnd.ms-excel",
            "application/vnd.msexcel",
            "text/anytext",
            "text/csv",
            "text/x-comma-separated-values"
        ];
        
        if (searchStringInArray(file.type, types) != -1) {
            returnObj.result = true;
        } else {
            returnObj.result = false;
            returnObj.message = "File appears to be incorrect file type.";
        }
        return returnObj;
    }
    
    var processFile = function(file, callback) {
        var reader = new FileReader();    
        
        reader.readAsText(file);
        reader.onloadend = function() {
            var splitContent = reader.result.split("\n");
            result.columns = splitContent[0].split(",");
            result.sampleRow = splitContent[1].split(",");
            if (callback) {
                setTimeout(callback, 1);
            }
        }
    }
    
    /* Output Functions ---------- */
    var buildOutput = function(items)
    {
        var output = "";
        $.each(items, function(index, item) {
            output += "<li>" + item + "</li>";
        });
        return output;
    }
    
    var ...</strarray.length;>
  • Drag and drop column matching

    jQuery 1.8.3, HTML, CSS, JavaScript, jQuery UI 1.9.2

    var sourceData = ["Column A", "Column B", "Column C"];
    
    var targetData = {
        field1: { title: "Field 1", value: "" },
        field2: { title: "Field 2", value ...
  • 1
  • 2