Suddenly my drop down year picker isn't showing year no more, on any page. Any ideas what has happened?
is set in the call (vm3.0.12)
vmjsapi.php
// Virtuemart Datepicker script
static function jDate($date='',$name="date",$id=NULL,$resetBt = TRUE, $yearRange='') {
if ($yearRange) {
$yearRange = 'yearRange: "' . $yearRange . '",';
}
where are you calling it?
the sublayouts/customfields.php doesn't seem to have a date range call. :(
$customfield->display = '<span class="product_custom_date">' . vmJsApi::jDate ($customfield->customfield_value,$customProductDataName) . '</span>';
I'm not quite sure I get your question, but I'm using VirtueMart 3.0.11.4. The script looks like (/components/com_virtuemart/helpers/vmjsapi.php) -
// Virtuemart Datepicker script
static function jDate($date='',$name="date",$id=NULL,$resetBt = TRUE, $yearRange='') {
if ($yearRange) {
$yearRange = 'yearRange: "' . $yearRange . '",';
}
The year picker wont work on front-end nor back-end.
well .. that's what I told you.....
and I asked where you are calling it because in the custom field sublayouts there is no value for $yearRange that I can see
vmJsApi::jDate ($customfield->customfield_value,$customProductDataName)
try "2015:2019"
vmJsApi::jDate ($customfield->customfield_value,$customProductDataName,NULL,TRUE,"2015:2019")
Oh, I'm sorry. I call it with a shopper field (such as birth date).
I've tried using vmJsApi::jDate ($customfield->customfield_value,$customProductDataName,NULL,TRUE,"2015:2019") but that didn't work.
SOLVED:
Changed administrator/components/com_virtuemart/helpers/vmjsapi.php
694 : $yearRange = 'yearRange: "1980:2030",';
Thanks for guiding me.
I think there is a case for a fallback there
if ($yearRange) {
$yearRange = 'yearRange: "' . $yearRange . '",';
}else{
$yearRange = 'yearRange: "2015:2020",';
}
or what ever (use current date() etc)
Yeah, that's a good idea, I think I'll just make it use date('Y')-80 and date('Y')+15 as range.
a bit discriminatory against 90 year olds.. ;)
Or time travelers :o