<?php echo $this->getLayout()->createBlock('core/html_calendar')->setTemplate('page/js/calendar.phtml')->toHtml(); ?>
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
    <li>
        <?php if ($this->getMethodCode() == 'msp_payafter') { ?>
            <label for="birthday" 				style="width:200px!important;">Geboortedatum (dd-mm-yyyy):</label>
            <input name='payment[birthday]' value="<?php echo $this->getBirthday(); ?>" placeholder='DD-MM-YYYY' id="msp_payafter_birthday"  readonly />
            <span id="msp_payafter_birthday_trig">
                <img style="display: inline;" src="<?php echo $this->getJsUrl('calendar/img.gif') ?>" class="v-middle"/>
            </span>
            <br />
            <label for="accountnumber" 		style="width:200px!important;">Rekeningnummer:</label>
            <input name='payment[accountnumber]' 		value="" 	id="accountnumber"/>
        <?php } ?>
    </li>
</ul>
<script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function() {
        Calendar.setup({
            inputField  : 'msp_payafter_birthday',
            ifFormat    : '%d-%m-%Y',
            button      : 'msp_payafter_birthday_trig',
            align       : 'Bl',
            onSelect: function(dateText,selectedDate) {
                jQuery('#msp_payafter_birthday').val(selectedDate);
            }
        });
        jQuery(document).on('click','#msp_payafter_birthday', function() {
            jQuery('#msp_payafter_birthday_trig').trigger('click');
        });
    });
    //]]>
</script>
