var DateTimeResources = { closeText: 'close', prevText: 'Prev', nextText: 'Next', currentText: 'Today', monthNames:{ january: 'January', february: 'February', march: 'March', april:'April', may: 'May', june: 'June', july: 'July', august: 'August', september: 'September', october: 'October', november: 'November', december: 'December' }, monthNamesShort:{ january: 'Jan', february: 'Feb', march: 'Mar', april: 'Apr', may: 'May', june: 'Jun', july: 'Jul', august: 'Aug', september: 'Sep', october: 'Oct', november: 'Nov', december: 'Dec' }, dayNames:{ sunday: 'Sunday', monday: 'Monday', tuesday: 'Tuesday', wednesday: 'Wednesday', thursday: 'Thursday', friday: 'Friday', saturday: 'Saturday' }, dayNamesShort:{ sunday: 'Sun', monday: 'Mon', tuesday: 'Tue', wednesday: 'Wed', thursday: 'Thu', friday: 'Fri', saturday: 'Sat' }, dayNamesMin:{ sunday: 'Su', monday: 'Mo', tuesday: 'Tu', wednesday: 'We', thursday: 'Th', friday: 'Fr', saturday: 'Sa' }, dateFormat: 'M/d/yyyy', dateSeparator: '/', dateFullFormat: toFullFormat('M/d/yyyy','/'), firstDay: 0, checkInOutDateDisplayFormat: 'ddd, M/d/yyyy' }; var CurrencyResources = { }; var datepickerI18nOption = { dateFormat: toRightFormat(DateTimeResources.dateFormat,DateTimeResources.dateSeparator), dayNames: toArray(DateTimeResources.dayNames), dayNamesMin: toArray(DateTimeResources.dayNamesMin), dayNamesShort: toArray(DateTimeResources.dayNamesShort), monthNamesShort: toArray(DateTimeResources.monthNamesShort), monthNames: toArray(DateTimeResources.monthNames) }; function toFullFormat(format,separator){ var temp = format.toLowerCase().split(separator); for(var i = 0; i < temp.length ;i++){ if(temp[i].length==1){ temp[i] = temp[i] + temp[i]; } } return temp.join(separator).toUpperCase(); } function toRightFormat(format,separator){ var temp = format.toLowerCase(); var tempArray = temp.split(separator); for(var i = 0; i < tempArray.length ;i++){ if(tempArray[i].length==1){ tempArray[i] = tempArray[i] + tempArray[i]; continue; } if(tempArray[i].length==4){ tempArray[i] = tempArray[i].substr(0,2); continue; } } return tempArray.join(separator); }; function toArray(props){ var array = []; for (var name in props){ array.push(props[name]); } return array; };