VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: finerdesign on August 14, 2014, 16:10:52 PM

Title: shopper fields
Post by: finerdesign on August 14, 2014, 16:10:52 PM
Hi
I add a date in VM shopper fields. year is from 1914 to 2014 but I want to change it from 1335 to 1393. how can I do it?
its necessary. please help me
Thanks

[attachment cleanup by admin]
Title: Re: shopper fields
Post by: samlf3rd on August 20, 2014, 16:08:16 PM
Quote from: finerdesign on August 14, 2014, 16:10:52 PM
Hi
I add a date in VM shopper fields. year is from 1914 to 2014 but I want to change it from 1335 to 1393. how can I do it?
its necessary. please help me
Thanks

What do you mean from 1335 to 1393?
Title: Re: shopper fields
Post by: GJC Web Design on August 20, 2014, 16:32:51 PM
assume he's looking for very old customers from the 12th century

haven't looked but assume it uses the native Joomla datepicker

somewhere you have to insert the JS over ride a la the J docs

<script type="text/javascript">

Calendar.setup({
range : [1335,1393]
});
</script>


or edit what is already there



Title: Re: shopper fields
Post by: balai on August 20, 2014, 17:36:38 PM
Maybe the guy is not using the standard calendar http://en.wikipedia.org/wiki/List_of_calendars
Title: Re: shopper fields
Post by: GJC Web Design on August 20, 2014, 18:15:57 PM
found it - administrator/components/com_virtuemart/helpers/vmjsapi.php

~ line 388

// $yearRange format >> 1980:2010
   // Virtuemart Datepicker script
   static function jDate($date='',$name="date",$id=NULL,$resetBt = TRUE, $yearRange='') {
if ($yearRange) {
         $yearRange = 'yearRange: "' . $yearRange . '",';
      }
//add

$yearRange = 'yearRange: "1335:1393",';