Hello,
i am try to set default year and month but calendar always open currentyear and month…
what’s bug in my code?
var document_date = app.calendar.create({
inputEl: '#document_date',
openIn: 'customModal',
dateFormat: 'dd-mm-yyyy',
header: false,
footer: false,
currentMonth:11,
currentYear:2016,
closeOnSelect: true,
});
Thanks…
Have you tried this way?
var document_date = app.calendar.create({
inputEl: '#document_date',
openIn: 'customModal',
dateFormat: 'dd-mm-yyyy',
header: false,
footer: false,
closeOnSelect: true,
});
document_date.setYearMonth(year, month, duration)
i am try this:
document_date.setYearMonth(2016, 11, 10000)
but i am getting this error. what am i wrong?
as if trying to make changes before the process ends. try this
var document_date = app.calendar.create({
inputEl: '#document_date',
openIn: 'customModal',
dateFormat: 'dd-mm-yyyy',
header: false,
footer: false,
closeOnSelect: true,
on:{
init:function(calendar){
calendar.setYearMonth(year, month, duration)
}
}
});
I have put demo in jsfiddle
https://jsfiddle.net/paraswegasoft/cat31efb/8/
please tell me what am i wrong
please help…
thanks…
Solution found… like this:-
Demo here
var cal=app.calendar.create({
inputEl: '#document_date',
openIn: 'customModal',
dateFormat: 'dd-mm-yyyy',
header: false,
footer: false,
closeOnSelect: true,
on:{
open(c){
cal.setYearMonth(2016,1,0);
cal.update();
}
}
});
thanks all friends…