VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: techrahul87 on April 12, 2012, 09:51:12 AM

Title: Date picker customizing
Post by: techrahul87 on April 12, 2012, 09:51:12 AM
Hello
I am using Jooml2.5.0 and vm 2.0.. i have added a shopper field birthday...
I want format in m/d.. I have changed it from ini file..
now i want that my calender in billing form should display month and date only..
and data should be saved in month and and date only..so that when data is displayed or sent on mail...it should only show month and date...
i dont know how to start....help please....
Title: Re: Date picker customizing
Post by: Studio 42 on April 12, 2012, 19:21:55 PM
you could for eg addint this javascript in your form display code.
$front = JURI::root(true).'/components/com_virtuemart/assets/';
$document->addScript($front.'js/jquery.ui.datepicker.min.js');
$document->addStyleSheet($front.'css/ui/jquery.ui.all.css');
jQuery(document).ready( function($) {
  jQuery('#calender _field').datepicker( {
        changeMonth: true,
        changeYear: true,
        showButtonPanel: true,
        dateFormat: 'dd MM'
    });
});


and using a text input  type
on create the field the name must be same as the ID without "_field" (here it's "calender")

Title: Re: Date picker customizing
Post by: lilyferchita on August 30, 2012, 17:35:44 PM
Quote from: techrahul87 on April 12, 2012, 09:51:12 AM
Hello
I am using Jooml2.5.0 and vm 2.0.. i have added a shopper field birthday...
I want format in m/d.. I have changed it from ini file..
now i want that my calender in billing form should display month and date only..
and data should be saved in month and and date only..so that when data is displayed or sent on mail...it should only show month and date...
i dont know how to start....help please....



Where do you change it this?? what path?