WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Datepicker issue
- AuthorPosts
- 5 May, 2018 at 4:02 pm #37091
Hey Olly-
I want to put this issue to bed with this.
My programmer acknowledges your point, but says styling the spinner will be a “very complicated” process and about 2000 lines of code.
Is he correct or should I look for someone else to do this?5 May, 2018 at 4:26 pm #37092how is this complicated ?
you roll your theme, download it and include/enqueue it (you can probably even use some priority value to include it before the styles you already have, so your current styles would override the newly added ones if the same classes are being used )
or – as mentioned several times now – simply choose from one of the default themesthat’s about 2 lines of code
with the added advantage that if you ever add another jquery-ui-element (other than your current datepicker(s) and the spinner) they are also already styled .
5 May, 2018 at 4:41 pm #37093sure, if you want to style ui-elements with your own css instead of taking advantage of the themeroller css options, you’ll spend a lot of time doing this and – in my book – is a complete waste of time as not only are you trying to re-invent the wheel but also have to know each and every class etc etc that ui-elements use whereas if you use what exists you can sinply forget about all of that
you dont even have to know what the classes are and don’t have to ever worry about updating anything when versions or whatnot change.
For example, currently wordpress uses 1.11. One day wordpress will probably be using 1.12 or higher. If you use your own css, you’ll have to maintain it.
Do you really want to waste your time checking for this every time there might be an update to something ?5 May, 2018 at 5:20 pm #37094I don’t need to customize the style the spinner — using one of the choices from the drop down will suffice. In fact, there are several I like.
My only objective is to NOT have it affect my date pickers– which is uniquely styled to fit the rest of the site (being that we are a hotel the date pickers are quite prominent.)
So accomplishing that will be a easy process as you mentioned above?
5 May, 2018 at 5:31 pm #37095there are many ways to do that .
the one outlined above
or dequeueing the ui-css on the pages that have the datepicker on them
or filtering the parameter (wppizza[order_settings][order_page_quantity_change_style]) to be empty https://docs.wp-pizza.com/developers/?section=filter-wppizza_filter_options on those pagesreally up to your imagination
5 May, 2018 at 5:33 pm #37096of course dequeueing things (or similar) on pages that – one day perhaps – have datepickers and spinners on them will break things
5 May, 2018 at 5:37 pm #37097i’m simply not going to add the overhead of checking every single page or sidebar on every single page request for the possibility of a page haveing wppizza code/shortcodes on them , for the odd theme here or there (hence such an option will never be added to the plugin)
but you can do this for your particular thing as mentioned without having to cause this overhead as you know what your pages are5 May, 2018 at 6:02 pm #37098Thanks! I truly appreciate it!
9 May, 2018 at 9:13 pm #37176Hi Olly,
We tried changing the priority level of the style we already have (FYI, we place a “9999” in the string) and it broke a lot of the customizations on other parts of the site.
The theme support people said this:
That means the styles does not compatible with each other. If you only need the spinner, you may copy the spinner css to place in our theme instead. You may ask the plugin author to provide you that code, and then, place it at the “theme option > general > page style > additional css” area for this.
Let me know if this is possible Olly. If not, I’ll have to roll without the spinner for a while — probably not the end of the world.
9 May, 2018 at 10:10 pm #37181i dont know in how many other ways i can say this:
the spinner (and all other jquery ui elements’) css is coming directly from jquery ui / themeroller and not from the wppizza plugin (hence you will see something like //ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css) in your source
wppizza only “enqueues” it if selectedif you want to add only the spinner css have to grab it from there and add/include it (but i believe we’ve been here before. the spinner css in tons of lines of css so finding and getting all the ones you need is – at bets – tedious)
i would suggest you simply look into dequeueing it on the relevant pages (as mentioned )
PS: of course you will change/break customised css if you change priorities of the themes’ stylesheet without accounting for it elsewhere.
9 May, 2018 at 11:47 pm #37182in fact, it might even work by simply dequeueing the jquery-ui-[selected_style]-css and rerequeing it with a lower priority so it gets loaded before any of your other stylesheets so those (i.e your datepicker) simply overwrite the set styles
without having to check for post_id’s and whatnotmileage will vary. really depends on what the other styles do
- AuthorPosts
- The topic ‘Datepicker issue’ is closed to new replies.