Hello,
My newest quest has been tough to get my hear around... I have not found a thread here to get me on the right path in my situation.
I have a single inline datepicker. I have it so the selected date will show in 3 DIV's. One for the day ("DD, d"), the other for the month ("MM"), and then the Year ("yy").
- <script type="text/javascript">
$(document).ready(function () {
$( "#datepicker" ).datepicker({
onSelect: function(dateText, inst) {
//formatDate Requires a new date object to work
var myDate = new Date(dateText);
var myDate2 = new Date(dateText);
var myDate3 = new Date(dateText);
//Set a new var with different format to use
var newFormat = $.datepicker.formatDate("DD, d", myDate);
var newFormat2 = $.datepicker.formatDate("MM", myDate2);
var newFormat3 = $.datepicker.formatDate("yy", myDate3);
//Choose the div you want to replace
$("#apDiv1").html(newFormat);
$("#apDiv5").html(newFormat2);
$("#apDiv7").html(newFormat3);
}
});
});
</script>
I can't seem to get it so that when a date changes in the DIV, that 2 events will be called to post in a different DIV.. Let me focus on just the Day ("DD, d") DIV..(#apDive1).
When a date is selected on the datepicker, the date will show in (#apDiv1) in the format of "DD, d". so when this 'change' happens, it will post that date to "daypower.php" to display the sum value of that day in (#apDiv2).... AND the same change will also post "daygraph.php" to return the data in (#apDive4).
I tried to have the date first loaded in the page, and that dateText will assure the right event, but NO result. I am not sure at this time, so I am back at square one with a clean slate that you see above.
Thanks,
Alan