Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Date input field in frontend - onepage checkout
 
hekier
Jr. Member
 
Total Posts:  8
Joined:  2008-04-25
Denmark, Smorum
 

Hi

Hope some one can help me…

I’m trying to implement a input date field in the onepage checkout, but I can’t get it working…

I added the following to checkout.xml - that seems to work

<reference name="head">
                <
action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
                <
action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
                <
action method="addItem"><type>js</type><name>calendar/lang/calendar-en.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
                <
action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>

And to the page available.phtml the following

<label for="calendar-deldate"><?php echo $this->__('deldate'?></label><br />
<
input type="input-text" name="calendar[<?php echo $this->getQuote()->getId() ?>][deldate]" id="calendar-deldate" title="<?php echo $this->__('deldate') ?>"  value="<?php echo $this->getEscaped($this->getQuote()->getDeldate(), $this->getQuote()->getDefaultDeldate()) ?>" class="input-date validation-passed"/>
<
img src="<?php echo $this->getSkinUrl('images/grid-cal.gif') ?>" alt="" class="v-middle" id="calendar-deldate_trig" title="<?php echo $this->__('Date selector') ?>" />
<
script type="text/javascript">
Calendar.setup({
inputField 
"calendar-deldate",
ifFormat "<?php echo $this->getShortDateFormat() ?>",
button "calendar-deldate_trig",
align "Bl",
singleClick true
}
);
</script>

Any suggestion is welcome!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
gamelodge
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2007-08-31
Brisbane, Qld, Australia
 

Yeah I am also trying to do this....

If you get a solution let me know, if I can figure it out i will do the same, I am trying to do it via a extra module not directly changing any default code if possible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gamelodge
Sr. Member
 
Avatar
Total Posts:  89
Joined:  2007-08-31
Brisbane, Qld, Australia
 

see this thread for some help too

http://www.magentocommerce.com/boards/viewthread/1104/P0/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top