2

I want to setup date picker in frontend form,

and I did this currently, datepicker is shown in a frontend form

only one issue is that when I click on today in datepicker it take the wrong date

screenshot: -

http://prntscr.com/mzsyg5

<script type="text/javascript">
                      //<![CDATA[
                          Calendar.setup({
                              inputField: "RebillStartDate",
                              ifFormat: "%d/%m/%Y",
                              showsTime: true,
                              button: "rebillstartdate",
                              align: "Bl",
                              singleClick : true
                            });
                     //]]>
</script>
8
1

try it like this i know its too late but still if someone faces this kind of similar issue then this would be helpful

<script type="text/javascript">
                            require([
                                "jquery",
                                "mage/calendar"
                                ], function($){
  $('#datepicker').datepicker({
       prevText: '&#x3c;zurück', prevStatus: '',
        prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '',
        nextText: 'Vor&#x3e;', nextStatus: '',
        nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '',
        monthNames: ['Januar','Februar','März','April','Mai','Juni',
        'Juli','August','September','Oktober','November','Dezember'],
        monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
        'Jul','Aug','Sep','Okt','Nov','Dez'],
        dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
        dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
        dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
      showMonthAfterYear: false,
      dateFormat:'d.m.yy'
    } 
  );
                                });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.