Datepicker issue

Viewing 11 posts - 21 through 31 (of 31 total)
  • Author
    Posts
  • #37091
    spaulgal
    Participant

      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?

      #37092
      Olly
      Admin & Mod

        how 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 themes

        that’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 .

        #37093
        Olly
        Admin & Mod

          sure, 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 ?

          #37094
          spaulgal
          Participant

            I 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?

            #37095
            Olly
            Admin & Mod

              there 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 pages

              really up to your imagination

              #37096
              Olly
              Admin & Mod

                of course dequeueing things (or similar) on pages that – one day perhaps – have datepickers and spinners on them will break things

                #37097
                Olly
                Admin & Mod

                  i’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 are

                  #37098
                  spaulgal
                  Participant

                    Thanks! I truly appreciate it!

                    #37176
                    spaulgal
                    Participant

                      Hi 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.

                      #37181
                      Olly
                      Admin & Mod

                        i 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 selected

                        if 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.

                        #37182
                        Olly
                        Admin & Mod

                          in 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 whatnot

                          mileage will vary. really depends on what the other styles do

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