Code Monkey home page Code Monkey logo

Comments (8)

cornernote avatar cornernote commented on July 23, 2024 1

I saved the output of the working version and a non-working version, then twiddled the broken version.

The thing that makes it work is changing this:

<script src="/assets/914ad999/js/bootstrap.js"></script>
<script src="/assets/2e647d59/js/bootstrap-datepicker.js"></script>
<script src="/assets/a72cdb8f/jquery-ui.js"></script>

To this:

<script src="/assets/a72cdb8f/jquery-ui.js"></script>
<script src="/assets/914ad999/js/bootstrap.js"></script>
<script src="/assets/2e647d59/js/bootstrap-datepicker.js"></script>

jquery-ui has to be output before bootstrap.

That's probably tricky to resolve in this lib, because the calendar widget doesn't use jquery-ui. It's only used by the auto-complete widget.

I think the best option for me is the hacky output buff I suggested above. If you have a better way to do it I am all ears. If you can think of a way to make the library do it internally then that would be awesome.

from yii2-date-picker-widget.

cornernote avatar cornernote commented on July 23, 2024

interestingly, if I put the autocomplete field first it works correctly

from yii2-date-picker-widget.

tonydspaniard avatar tonydspaniard commented on July 23, 2024

@cornernote seems that there is an issue with the js files order.

from yii2-date-picker-widget.

cornernote avatar cornernote commented on July 23, 2024

I guess as a hacky fix I can output buff a fake autocomplete field, then destroy the output.

Would be great if there was a cleaner way to solve it.

from yii2-date-picker-widget.

tonydspaniard avatar tonydspaniard commented on July 23, 2024

Let me know your findings if we can improve the library. Thanks

from yii2-date-picker-widget.

cornernote avatar cornernote commented on July 23, 2024

haven't had a chance to get back to it.. i'll be working on it again later in the week.

from yii2-date-picker-widget.

tonydspaniard avatar tonydspaniard commented on July 23, 2024

I would create an Asset Bundle and set those that register those libraries turned off, that way I can ensure the order.

from yii2-date-picker-widget.

clissmancamacho avatar clissmancamacho commented on July 23, 2024

Hi, how are you? I have the same problem. How i can resolve it?

from yii2-date-picker-widget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.