1 Replies - 807 Views - Last Post: 04 December 2012 - 07:29 AM

#1 Xna4life   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 21-February 12

Update textBox with more than 1 date from JQuery Calendar

Posted 04 December 2012 - 07:12 AM

So i've used a DateTime textbox to allow the user to enter a date and click create, it will add this date to the DB.

This works fine, So i've added a Jquery datePicker calendar to select multiple dates, (which works) but when I close the calendar it only adds the last selected date to the DateTime text box....

How can I go about where it will add all of the dates to the text box and save them to the DB?

So Im using:
<script>
$("#HolidayDate").addClass('date-pick');
$('.date-pick').datePicker
(
{
createButton: false,
displayClose: true,
closeonselect: false,
selectMultiple: true
}
)
.bind(
'click',
function () {
$(this).dpDisplay();
this.blur();
return false;
}
)
.bind(
'dateSelected',
function (e, selectedDate, $td, state) {
console.log('You ' + (state ? '' : 'un') // wrap
+ 'selected ' + selectedDate);
}
)
.bind(
'dpClosed',
function (e, selectedDates) {
console.log('You closed the date picker and the ' // wrap
+ 'currently selected dates are:');
console.log(selectedDates);
}
);



</script>

from the website... http://www.kelvinluc...demo/index.html[^]

Thanks J

Is This A Good Question/Topic? 0
  • +

Replies To: Update textBox with more than 1 date from JQuery Calendar

#2 Kruithne   User is offline

  • D.I.C Regular
  • member icon

Reputation: 99
  • View blog
  • Posts: 442
  • Joined: 28-July 09

Re: Update textBox with more than 1 date from JQuery Calendar

Posted 04 December 2012 - 07:29 AM

Hello there,

Please don't make multiple threads for the same issue. This was posted in Javascript and has acquired answers. A mod will most likely shift it to the correct forum when they have the time spare.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1