收录日期:2020/10/28 08:30:28 时间:2010-09-07 02:28:45 标签:php,ajax,datepicker

In attachment File Have ziped file for Ajax Datepicker. The Code is working but i have some problem.

if i want to use it with php, how can i know where is the $_POST name .

Code :

<div id="widget"><div id="widgetField" style="width: 290px; height: 26px"> <span>28 July, 2008 ÷ 31 July, 2008</span> <a href="#">Select date range</a>      </div>      <div id="widgetCalendar">       </div>      </div>

Between I want insert the text into database.

I'm sorry for my language

Attach file : http://www.sscic.org/code.zip

Open layout.js:

Find:

onChange: function(formated) {
    $('#widgetField span').get(0).innerHTML = formated.join(' ÷ ');
}

Replace with:

onChange: function(formated) {
    $('#widgetField input[type=text]').get(0).value = formated.join(' - ');
}

Open index.html

Find:

<span>28 July, 2008 ÷ 31 July, 2008</span>

Replace with:

<input type="text" name="selectdate" />

Now your input has a name, you may also want to style the input field too. ;)