I have loaded dates in my code . At this time I cant change my code I mean I will do it when there is any other solution. so would you pleas tell me how can I convert dates to shamsi format? is there any function to for converting date to shamsi format in js??
may codes:
<input type="text" id="number" name="number"><input type="button" value="load" id="btn">
<select id="date" name="date">
</select>
js:
<script>
$(document).ready(function () {
$("#btn").click(function () {
var n=$("#number").val();
var i;
var d = new Date();
for (i=1 ; i<=n ;i++){
// var b=n;
$("#date").append("<option>"+d.getFullYear()+"/"+d.getMonth()+"/"+(d.getDate()+i)+"</option>");
}
});
});
</script>