Jump to content

Archived

This topic is now archived and is closed to further replies.

hungryfrank

how can I change the date picker

Recommended Posts

@saraboromand or @hungryfrank  In what way do you want to change the date picker?  I.e. how do you want it to change?  And which date picker?  On what page?  Does it show all the time or only when certain options are picked? 

You might post a screenshot of how it works now and possibly how you want it to work. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
1 hour ago, saraboromand said:

I tried many ways but unfortunately did not get any results

It's very simple, but depends on which version of osC you are using?

If it's BS4 shop side then to make a simple change to styling simply add the new css to your user.css like this, here we change the background color to pink.

.datepicker {
    background-color:pink!important;
}

image.png.c6c83c5d4fe06350acb55b9da84f6321.png

If you need to change how it is formated then you need to add some js script either edit file or make a new hook. Again we simply use the datepicker class and change the date format to dd/mm/yyyy

<script>
  $('.datepicker').datepicker({
    format: 'dd/mm/yyyy'
 });
</script>

 

It's the same principle for any css or js change. The admin side i belive is still using the js datepicker...

<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js', '', 'SSL'); ?>"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>

 


 

Share this post


Link to post
Share on other sites

very nice picker indeed.

I figured the  easiest way to proceed is to move all the time functions to language files. this way I can load the appropriate calendar for each language and show the correct date to user.

 keep the database entery dates as it is and translate the data that customer puts in to regular date data before inserting in the db. WORKING ON IT

I think if I could geolocate the user and set the calendar based on that in the front it would be great. but I have. no idea how to do that YET

 

 

 

 


you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Share this post


Link to post
Share on other sites

×