Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.21.244.240
// Year Month Calender by Srikanth Maharaj
function IncrementYear($year)
{
$year= parseInt($year)+1;
$('#year_month_cal').text($year);
//showYearMonthCalendar($g_year_month_cal_text_id);
}
function DecrementYear($year)
{
$year= parseInt($year)-1;
$('#year_month_cal').text($year);
//showYearMonthCalendar($g_year_month_cal_text_id);
}
function closeCalander()
{
$("#sub_div_year_calander").hide();
$("#ui_sub_div_year_calander").hide();
$("#ui_depot_sub_div_year_calander").hide();
}
function showYearMonthCalendar(id)
{
$g_year_month_cal_text_id=id;
var existing_val=$("#details_"+id).val();
var s = $("#details_"+id).position();
var Left = s.left-20;
var Top = parseInt(s.top);
if(Top<getWindowHeight())
{
Top = Top+15;
}
else
{
Top = Top-150;
}
$('#sub_div_year_calander').load("html_modules/MonthlyCalendar.html",function()
{
$("#sub_div_year_calander").show();
$("#sub_div_year_calander").css( {position: 'absolute',left: Left,top: Top} );
if(!empty(existing_val))
{
var split_arr=existing_val.split("-");
var year=split_arr[1];
var month_name=split_arr[0];
var month_id=getMonthIdForValue(month_name);
$("#"+month_id).addClass("ui-state-default ui-state-active");
$('#year_month_cal').html(year);
}
}
);
}
function getMonthIdForValue(val)
{
var month_array = new Array();
month_array['Jan'] = '01';
month_array['Feb'] = '02';
month_array['Mar'] = '03';
month_array['Apr'] = '04';
month_array['May'] = '05';
month_array['Jun'] = '06';
month_array['Jul'] = '07';
month_array['Aug'] = '08';
month_array['Sep'] = '09';
month_array['Oct'] = '10';
month_array['Nov'] = '11';
month_array['Dec'] = '12';
num_month = month_array[val];
return num_month
}
function assignYearMonthValue($month)
{
document.getElementById("details_"+$g_year_month_cal_text_id).value=$month+"-"+$('#year_month_cal').text();
$("#sub_div_year_calander").hide();
}
|