Calendar Initial Date
I was able to add a default CURDATE to my calendar. Can you help me with the code for something like CURDATE + 1YR (current date plus 1 year). Thank You,
I was able to add a default CURDATE to my calendar. Can you help me with the code for something like CURDATE + 1YR (current date plus 1 year). Thank You,
i would do it like this...
within the datepicker function add the following option.
defaultDate: '+1y +1d'
see Datepicker#option-defaultDate for more info
Initial date 30 days in future - $( ".selector" ).datepicker({ defaultDate: +7 });
<script type="text/javascript">
$(function(){
$('#datepicker_27').datepicker({
dateFormat: 'yy/mm/dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_27
});
});
function closeDatePicker_datepicker_27() {
var tElm = $('#datepicker_27');
if (typeof datepicker_27_Spry != null && typeof datepicker_27_Spry != "undefined" && adexpires_Spry.validate) {
datepicker_27_Spry.validate();
}
var docElm = document.getElementById("datepicker_27");
var tBlur = docElm.getAttribute("onBlur");
if (!tBlur) tBlur = docElm.getAttribute("onblur");
if (!tBlur) tBlur = docElm.getAttribute("ONBLUR");
if (tBlur) {
tBlur = String(tBlur).replace(/\bthis\b/g, "docElm");
eval(tBlur);
}
}
</script>
My insert and update page contains multiple date fields in case that makes a difference.
Thank You,
Thank You!!
you would add it to the list or arguments or configuring the datepicker.
the datepicker is created using this section of code:
$(function(){
$('#datepicker_27').datepicker({
dateFormat: 'yy/mm/dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_27
});
});
add the default date to the list of arguments:
$(function(){
$('#datepicker_27').datepicker({
defaultDate: '+30d'
dateFormat: 'yy/mm/dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_27
});
});
Am I missing something? Nothing was inserted.
<script type="text/javascript">
$(function(){
$('#datepicker_27').datepicker({
defaultDate: '+30d',
dateFormat: 'yy/mm/dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_27
});
});
function closeDatePicker_datepicker_27() {
var tElm = $('#datepicker_27');
if (typeof datepicker_27_Spry != null && typeof datepicker_27_Spry != "undefined" && adexpires_Spry.validate) {
datepicker_27_Spry.validate();
}
var docElm = document.getElementById("datepicker_27");
var tBlur = docElm.getAttribute("onBlur");
if (!tBlur) tBlur = docElm.getAttribute("onblur");
if (!tBlur) tBlur = docElm.getAttribute("ONBLUR");
if (tBlur) {
tBlur = String(tBlur).replace(/\bthis\b/g, "docElm");
eval(tBlur);
}
}
</script>
I dont follow, please provide more details
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.