Datepicker issue

Viewing 20 posts - 1 through 20 (of 31 total)
  • Author
    Posts
  • #36865
    spaulgal
    Participant

      Hello!

      It seems that WPP (3.3.5) is affecting the style of the date pickers that are used elsewhere on my site (Hotel Master theme)

      I’ve tested various other things and the only thing that seems to be causing this is WWP. When I deactivate WPP, the date picker’s style is restored. Note: The date picker still works of course, just the style is affected.

      Link to a SS:

      https://www.school31lofts.com/wp-content/uploads/2018/04/SS-olly.jpg

      #36874
      Olly
      Admin & Mod

        >It seems that WPP (3.3.5) is affecting the style of the date pickers that are used elsewhere on my site
        that’s correct if you enable WPPizza->Order Settings->Item and Cart Updates and Amendments -> “Enable increase/decrease …” (2 options) as it includes a themeroller stylesheet to style the spinner/number input boxes (these jquery/themeroller stylesheets affect all those UI interfaces ).
        However, as you have also a dropdown there to choose a particular style, i would think you can make that match the one that comes with the theme (if not, then i would have to see what stylesheet the theme includes if you have wppizza – or those options i mentioned above – disabled )

        #36881
        spaulgal
        Participant

          Thanks Olly. There was nothing like the theme’s default in drop down, so I currently have “I have my own style” selected. There really is no style now associated with those counter boxes.
          So at this point I need to ingest a style for them (and it seems the input fields on the order form?)

          I’d like to be able to use my theme’s default here, but it does not seem like it’s naturally working.

          #36882
          Olly
          Admin & Mod

            what do i have to click on – on your site – to actually see a wppizza “counter” (as you call them) box
            (PS: they are called “spinners” officially, just fyi )

            #36883
            spaulgal
            Participant
              #36884
              Olly
              Admin & Mod

                thanks

                the problem is that neither your theme nor your gdlr-hotel plugin provides css for the spinner element (only the datepicker from what i can see)

                so if you want to keep everything as is on that front , you’d have to add your own spinner css to your theme’s css ( and leave it as “I have my own style… etc”)

                alternatively “roll” your own theme and include that for all those jquery ui interfaces – https://jqueryui.com/themeroller/

                or select a theme from the ones available in wppizza (perhaps the “ui-darkness” one or the “dark hive”) which – as you know – will affect all other ui elements too (which is a good thing in my book to keep things consistent throughout all those elements)

                you could – of course – also just get the spinner parts/css of those and add those to your (child)theme’s css

                essentially , your theme’s/plugins styling of jQuery UI elements is incomplete as it only assumes usage of the ui element implemented by your particular theme/plugin. That’s understandable somewhat , but results in the issue you are facing

                (hope the above makes sense somewhat -kind of late here)

                #36885
                Olly
                Admin & Mod

                  PS: my *guess* is that the theme is using a copy of a themeroller css somewhat anyway , only with a bunch of ui elements omitted so selecting from the appropriate css from the wppizza dropdown will automatically add all missing elements’ css with the added bonus of not having to maintain it as well as consistency across all of them

                  #36886
                  spaulgal
                  Participant

                    Thanks that all makes sense and I’ll do my best to make progress over here. (and yes get some rest!)

                    #36887
                    spaulgal
                    Participant

                      Is there any way to tell the themeroller CSS to affect only the WPP spinners?

                      #36888
                      Olly
                      Admin & Mod

                        no, because it would defeat the point of using it in the first place
                        so if you want to have your own custom version, you have to use your own custom css (as mentioned previously in this thread)

                        #36940
                        spaulgal
                        Participant

                          Hi Olly
                          I spoke with the theme developer and his response was this. I suppose just let me know your response.

                          This is happening because the plugin loads its styles on all pages instead of loading it on pages where it is used.

                          Woocommerce provides a function called is_woocommerce which allows us to avoid that. I couldn’t find an equivalent function for wppizza plugin though. Try asking the plugin developer about this and I can help with the code if such function exists.

                          I tried using his method but it still affects other elements like datepicker:

                          https://jqueryui.com/download/#!version=1.12.1&components=100001011000000000011100000001000000000000000000

                          You can use the jquery-ui.css from the above link to try it yourself.

                          #36941
                          Olly
                          Admin & Mod

                            >This is happening because the plugin loads its styles on all pages instead of loading it on pages where it is used.
                            that’s simply not true
                            it’s caused by including the themeroller style – the inclusion of which was made optional for precisely the reason that if themes already include styling for jquery ui-elements it won’t be needed

                            alas – from what i can see – your theme does not actually provide any styling for ui elements and it is the gdlr-hotel plugin that provides and styles the datepicker using it’s own style but only for the datepicker.

                            furthermore – though somewhat unrelated – the wppizza.css only ever targets it’s own distinct elements and only where strictly necessary. Wherever possible and sensible it will try to use a themes’ style

                            lastly, using an equivalent of “is_woocommerce” would do no such thing as it would also not load any styles on the checkout pages or in fact any page that shows the wppizza menu items or any wppizza widgets, shortcodes etc etc
                            (the overheads of checking a page content/sidebar to see if a particular widget/shortcode/whatnot is used are quite high and one would have to do that for every single pagecall. one of the reasons why woo doesn’t do that either one suspects)

                            #36942
                            Olly
                            Admin & Mod

                              People might disagree here – and that’s perfectly ok of course – but in my book, if you are using/loading a jquery ui-element you should also use (or at least offer the option to use) one of the themes/styles that are made for that purpose
                              (not to mention the convenience of not having to maintain it and automatically being able to take advantage of any improvements etc that might get added over time)

                              #37011
                              spaulgal
                              Participant

                                Hi Olly–
                                Would you consider an option that will deploy the spinner only on WPP pages?
                                That way those who disagree can toggle it that way.

                                #37012
                                Olly
                                Admin & Mod

                                  that option already exists by not including/enabling the themeroller css and adding your own css for the spinner (presumably from copying it when creating your own themeroller css) somewhere

                                  #37072
                                  spaulgal
                                  Participant

                                    What my programmer is saying (and oh course he can be wrong) is that switching the option off only disables the style and not the JS. So (as a result) adding another instance to style the spinner (only) will be complicated code wise.

                                    Is he thinking about this wrongly?

                                    #37073
                                    Olly
                                    Admin & Mod

                                      >switching the option off only disables the style and not the JS
                                      that is correct. there is an awful lot of functionality attached to this spinner ui element which would not work if the js is not loaded

                                      #37074
                                      Olly
                                      Admin & Mod

                                        >So (as a result) adding another instance to style the spinner (only) will be complicated code wise.
                                        why ? it’s just some style and has no bearing on the js.
                                        (unless you force the ui-js to be added again too, for no reasons i can see)

                                        #37075
                                        spaulgal
                                        Participant

                                          For the record, this makes perfect sense to me. I don’t know why my guy (who’s typically savvy) is totally caught up. He’s convinced a fresh instance of themeroller needs to be installed.

                                          Can you point me to example spinner CSS?

                                          #37084
                                          Olly
                                          Admin & Mod

                                            you already know this from what i can make out…?!
                                            http://jqueryui.com/download/#!version=1.11.4

                                          Viewing 20 posts - 1 through 20 (of 31 total)
                                          • The topic ‘Datepicker issue’ is closed to new replies.