WP Datepicker is a kind of “must will work” plugin which is based on jQuery UI datepicker. It can be easily styled and use with a simple settings page instead of bothering about jQuery and other scripting dependencies. Its developed for those users who are tired of datepicker implementation every-time from demo websites which simply don’t work for them in first go. It is simply a ready to use plugin.
A lot more is coming soon!
It was just a headache for me to implement jQuery plugins every-time by searching their demo versions and them generic documentation. So i have just developed this plugin as an initiative towards one click solution for such time taking mess. It will obviously move towards timepicker and other plugins by jQuery too.
Example#1:
On from date selection, to date should be changed and 7 days should be added.
<script type=”text/javascript” language=”javascript”>
jQuery(document).ready(function($){
<?php
$wpdp_options_db = get_option(‘wpdp_options’);
?>
$(“#dt1”).datepicker({
dateFormat: “<?php echo $wpdp_options_db[‘dateFormat’]; ?>”,
minDate: 0,
onSelect: function (date) {
var date2 = $(‘#dt1’).datepicker(‘getDate’);
date2.setDate(date2.getDate()+7);
$(‘#dt2’).datepicker(‘setDate’, date2);
}
});
$(‘#dt2’).datepicker({
dateFormat: “<?php echo $wpdp_options_db[‘dateFormat’]; ?>”
});
});
</script>