So many Zen Cart's admin pages are using SpiffyCalendar!
https://i.imgur.com/Qq8TLqZ.png
Sadly, that's not really good calendar to be use anymore.
But, does not Zen Cart already implement Bootstrap?
Then I suppose we can also use the Bootstrap's Datepicker!
https://bootstrap-datepicker.readthedocs.io/en/latest
https://buildmedia.readthedocs.org/m...datepicker.pdf
---
However, it seems those two datepickers have to be in the "form."
For example, in my custom "Rental Form," I have the following codes for the rental date ranges.
https://i.imgur.com/gbVJvWj.png
In this form, I set the end date based on starting date and starting date must be today or future's dates.
Hence the reasons I have to have hidden fields to check on date values.
HTML Code:
<input type="hidden" id="rental_startdate_temp" value="<?php echo isset($_POST['rental_startdate']) ? $_POST['rental_startdate'] : ''; ?>" />
<input type="hidden" id="rental_enddate_temp" value="<?php echo isset($_POST['rental_enddate']) ? $_POST['rental_enddate'] : ''; ?>" />
<label class="inputLabel">Rental Dates:</label>
<div id="two-column">
<div id="left">
<label class="inputLabelA" for="rental_startdate">Delivery</label>
<input type="text" id="rental_startdate" name="rental_startdate" />
</div>
<div id="right">
<label class="inputLabelB" for="rental_enddate">Return</label>
<input type="text" id="rental_enddate" name="rental_enddate" />
</div>
</div>
<br class="clearBoth" />
In a separate JavaScript file...
Code:
$(function() {
//Datepicker's on "Rental Starting Date" field.
$( "#rental_startdate" ).datepicker({
minDate: 0,
changeMonth: true,
numberOfMonths: 3,
onSelect: function( selectedDate ) {
$( "#rental_enddate" ).datepicker( "option", "minDate", selectedDate );
$( "#rental_enddate_temp" ).val(selectedDate);
}
});
//Datepicker's on "Rental Ending Date" field.
$( "#rental_enddate" ).datepicker({
minDate: 0,
changeMonth: true,
numberOfMonths: 3,
onSelect: function( selectedDate ) {
$( "#rental_startdate" ).datepicker( "option", "maxDate", selectedDate );
$( "#rental_startdate_temp" ).val(selectedDate);
}
});
// If user had put rental starting date, data will be retrieved from hidden field.
if ($("#rental_startdate_temp").val()!= '') {
var rentStartDateText = $("#rental_startdate_temp").val();
$("#rental_startdate").val(rentStartDateText);
}
// If user had put rental ending date, data will be retrieved from hidden field.
if ($("#rental_enddate_temp").val()!= '') {
var rentEndtDateText = $("#rental_enddate_temp").val();
$("#rental_enddate").val(rentEndtDateText);
}
});
The "Keyword Capturing Dashboard" plugin is also using jQuery's datepicker.
https://i.imgur.com/szb76jT.png
So I am positive that datepicker can be completely replace the SpiffyCalendar.
However, it seems that codes were optimized around it and hence it is not simply just replace SpiffyCalendar into the datepicker one... There has to be some dependencies that possibly have to ensure the replacement is properly done.
Bookmarks