开发者

jQuery datepicker with php and mysql

i use jQuery datepicker. i disabled input text and wanted use it as simple calendar

http://jqueryui.com/demos/datepicker/#inline

but now i need to make it with php and mysql, so as retrieve news from database on selected date. for instance when admin adds news on 2011-07-07 i want to link this day on calendar. sorry for my bad english but if u understood please help, i really found lots of documentations but couldn't did.

i used

onselect also beforeShowDay

but cannot understand.开发者_JAVA百科 is there any chance to make it like news calendar?

help me with a small code please...


Use setDate.

$('...').datepicker('setDate', date object);


you can use the before show function of the date field to call a location.

$('input.dateSelect').datepicker();

then have a button that follows the input

<a href="javascript:;" title="get the new from this date!" onclick="[[call to js function]]">[ get news ]</a>

javascript function

... window.location.href = "www.foo.com/news.php?date="+$('.dateSelect').val(); ...

There is one of several ways to skin this cat, and not necessarily the best.

I hope this helps someone else with the same issues!

bo huttinger

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜