Datepicker aspect

  • Posts: 3
  • Thank you received: 0
3 years 6 months ago #325554

-- url of the page with the problem -- : mong20auteuil.fr
-- HikaShop version -- : HikaShop Business 4.3.0
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.4.12
-- Browser(s) name and version -- : Chrome

Hi

I would like to change the color of the selected date in the date picker, where is the css for this module?

Also, I have a custom time picker made from a listfield, which file should I modify to add some code in it?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
3 years 6 months ago #325563

Hi,

The CSS comes from the file code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css
So you can't modify the CSS directly.
However, you can add your own CSS code which overrides the CSS form that file in a CSS file of your website.
For example, if you add the CSS:
.ui-state-active {
color:red !important;
}
in the "style for the frontend" setting, under the "Display" tab of the HikaShop configuration, the selected day will be red in your date picker:
monosnap.com/file/GnQkeZykCMGtSW1HKDNpTgR3nnCnOF
www.hikashop.com/support/documentation/1...ize-the-display.html

The following user(s) said Thank You: Bgraham

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
3 years 6 months ago #325578

Thanks for your answer, as always matches.

I had another question regarding a custom time picker made from a listfield, which file should I modify to add some code in it?

Please Log in or Create an account to join the conversation.

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
3 years 5 months ago #325622

Hi,

I'm not sure what you mean by "custom time picker made from a listfield" nor what modification you want to make so I can't say much.
Could you provide a screenshot of the settings of the custom field, and provide more information on what kind of code you want to add in it ?

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
3 years 5 months ago #325647

Hi

I've set a date picker (mentionned previously,)and I also need a time picker , but specific to times depending on when the order was passed.
the project is door to door delivery of a supermarket
I've set up a list view which lists the timeframes the client can require the deliver to be made.
it has been set up through custom fields using a simple list

What I'd like to do is add some custom code, which based on the time the customer places his order, will only list the time frames available for the day he has selected

I don't know how to add a screenshot ., so ie
- the deliveries can only happen 4 hours after the order has been placed
- if a customer places an order at 12.00, the first time frame displayed in the list will be 16.00-1700

Not sure I've made that point very clear I'm sorry...

Please Log in or Create an account to join the conversation.

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
3 years 5 months ago #325652

Hi,

One thing that is strange to me is that you want a date picker and then a time picker, but you don't want the time picker to be based on the date selected in the date picker but instead to be based on the current date.
If you want to base the time picker values on the current date, then I would recommend to create a new type of custom field via a plugin implementing the fields API of HikaShop:
www.hikashop.com/support/documentation/6...entation.html#fields
That way, in the code of the plugin you can extend from the single dropdown type and dynamically set the values you want based on the current date.
You can see an example of such plugin in the folder plugins/hikashop/datepicker_field/ in your website. That plugin adds the "advanced date picker (recommended)" type to the custom fields system.

Now if you want to based the values of the time picker based on the date selected in the date picker, you need to do it completely different. Instead, you'll have to add javascript code (you could do that in a view override of show_block_fields.php , via the menu Display>Views) in order to have an event listener on the "onchange" event of the input field of the date picker so that you can call your own javascript function to update the values in the dropdown for the time picker.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum