Update TextBox With More Than 1 Date From JQuery Calendar
Hey Guys,
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?
<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>
-