jQuery Plugins - Month Picker v2 - Demo


More Information Please Visit http://www.yctin.com/

Example 1, basic

$("#example_1").monthpicker(callback);
Month Picker v2




Example 2, set default value

$("#example_2").monthpicker("1995-12",callback);
Month Picker v2



Example 3, elements settings

$("#example_3").monthpicker({
	elements: [
		{tpl:"month",opt:{

			value: 1
		}},
		{tpl:"year",opt:{

			range: "-10~5",
			value: 2007
		}}

	],
	onChanged: callback
});
Month Picker v2



Example 4, quarter selector

$("#example_4").monthpicker({
	elements: [
		{tpl:"year",opt:{

			range: "-10~2",
			value: 2005
		}},

		{tpl:"quarter"}
	],
	onChanged: callback
});
Month Picker v2



Callback function

function callback(data,$e){
	var str = "";

	for(key in data) {
		str += " " + key + ": " + data[key]+ "; ";

	}
 
	var selector = "#message_" + $e.attr('id');

	$(selector).prepend("{" + str + "};<br />").show();

}