JS - Persian Symbols
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker3.css">
<div id="sandbox-container">
<input type="text" type="text" class="form-control" />
</div>
JavaScript
(function($, undefined) {
var $window = $(window);
function convert(num) {
var persian = {
0: '۰',
1: '۱',
2: '۲',
3: '۳',
4: '۴',
5: '۵',
6: '۶',
7: '۷',
8: '۸',
9: '۹'
};
var out = '';
for (i = 0; i < num.length; i++) {
out = out + persian[num[i]];
}
return out;
}
function UTCDate() {
return new Date(Date.UTC.apply(Date, arguments));
}
function UTCToday() {
var today = new Date();
return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
}
function alias(method) {
return function() {
return this[method].apply(this, arguments);
};
}
var DateArray = (function() {
var extras = {
get: function(i) {
return this.slice(i)[0];
},
contains: function(d) {
// Array.indexOf is not cross-browser;
// $.inArray doesn't work with Dates
var val = d && d.valueOf();
for (var i = 0, l = this.length; i < l; i++)
if (this[i].valueOf() === val)
return i;
return -1;
},
remove: function(i) {
this.splice(i, 1);
},
replace: function(new_array) {
if (!new_array)
return;
if (!$.isArray(new_array))
new_array = [new_array];
this.clear();
this.push.apply(this, new_array);
},
clear: function() {
this.splice(0);
},
copy: function() {
var a = new DateArray();
a.replace(this);
return a;
}
};
return function() {
var a = [];
a.push.apply(a, arguments);
$.extend(a, extras);
return a;
};
})();
// Picker object
var Datepicker = function(element, options) {
this.dates = new DateArray();
this.viewDate = UTCToday();
this.focusDate = null;
this._process_options(options);
this.element = $(element);
this.isInline = false;
this.isInput =...