//当前时间
var tmonth = new Date();
var year = tmonth.getFullYear();
var month = tmonth.getMonth();
var dom = $('.month');
//中间变量 记录
var tttmonth = '';
var tyear = '';
window.onload = function(){
!dom.hasClass("amonth")&&dom.addClass("amonth");
//当前日期
var date1 = new Date(year,month);
//当前月份
var tomonth = new Date().getMonth();
//
var today = new Date().getDate();
var dayhtml = [];
var week = ["日","一","二","三","四","五","六"];
for (var t=1;t<=3;t++){
dayhtml.push('
');
var date = date1;
month = date.getMonth()+t-1;
if (month>=11) {
tyear = year+1;
tttmonth = month-12 ;
// month = 0;
}else{
tyear =year;
tttmonth = month;
}
if(tttmonth==-1){
tttmonth=11;
tyear = year;
}
dayhtml.push('
'+(tttmonth+1)+'月'+''+tyear+'
')
// dayhtml.push();
// $.each(week,function(i,v){
// dayhtml.push('
'+week[i]+'
')
// });
var str = '';
$.each(week,function(i,v){
str += '
'+week[i]+'
';
});
dayhtml.push('
'+str+'
')
var nextdate = new Date(year,month)
var firstweek = nextdate.getDay();
// var firstweek = month.getDay();
// var first = month.getDay();
var allday = new Date(parseInt(year),(parseInt(month)+1),0).getDate();
var daystr = '
';
for(var i = 0;i
'
};
var data_cur_str=''; //日期str
var data_cur=''; //日期-
// 得到去程日期
var go_run_date=getPar('go_date');
// var date1 = new Date(go_run_date.replace(/\-/g, '/'));
// // 判断日期是否合理
// var date1 = new Date(start_date.replace(/\-/g, '/'));
// var date2 = new Date(end_date.replace(/\-/g, '/'));
// if (date1>date2 || end_date=="") {
// $('#id-date-picker-2').val(start_date);
// }
if (month==tomonth){
for(i=1;i<=allday;i++){
var t_m=(tttmonth+1);
var t_m_str=t_m;
var t_d_str=i;
if(t_m<=9){
t_m_str="0"+t_m;
}
if(i<=9){
t_d_str="0"+i;
}
data_cur_str=t_m_str+"月"+t_d_str+'日';
data_cur=tyear+"-"+(Array(2).join(0)+(tttmonth+1)).slice(-2)+"-"+(Array(2).join(0)+i).slice(-2);
var run_day=go_run_date.substring(8);
if(i
'+i+' ';
}else{
if(i==today){
// if(getPar('from')=="fill_order"){
// daystr+='