2011年8月28日 星期日
Increase MySQL max_allowed_packet
查看目前的max_allowed_packet:
SHOW VARIABLES LIKE 'max_allowed_packet'
在my.ini[mysqld]下
加上max_allowed_packet = 128M
重啟MySQL
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_allowed_packet
http://drupal.org/node/379976
2011年8月23日 星期二
Datepicker 設定日期選擇範圍
$(function() {
$(".timepicker").timePicker();
$(".datepicker").datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
beforeShow: customRange
});
});
function customRange(input) //設定datepicker的日期範圍
{
return {
minDate: (input.id == "pre_statistic_end_date" ? $("#pre_statistic_start_date").datepicker("getDate") : null),
maxDate: (input.id == "pre_statistic_start_date" ? $("#pre_statistic_end_date").datepicker("getDate") : null)
};
}
http://stackoverflow.com/questions/330737/jquery-datepicker-2-inputs-textboxes-and-restricting-range
$(".timepicker").timePicker();
$(".datepicker").datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
beforeShow: customRange
});
});
function customRange(input) //設定datepicker的日期範圍
{
return {
minDate: (input.id == "pre_statistic_end_date" ? $("#pre_statistic_start_date").datepicker("getDate") : null),
maxDate: (input.id == "pre_statistic_start_date" ? $("#pre_statistic_end_date").datepicker("getDate") : null)
};
}
http://stackoverflow.com/questions/330737/jquery-datepicker-2-inputs-textboxes-and-restricting-range
標籤:
datepicker,
jquery
訂閱:
文章 (Atom)