w20-framework / w20

W20 is a Web framework, built upon a powerful RequireJS/AngularJS/Bootstrap mix to help you develop single page applications.
https://w20-framework.github.io/
Mozilla Public License 2.0
8 stars 9 forks source link

Ui datepicker popup not working correctly for ui grid #92

Closed aritrabasu104 closed 5 years ago

aritrabasu104 commented 5 years ago

I used this example to create ui datepicker popup in grid. While it works correcly in french locale, it fails to work in english(default in my case). Any hints on where to look? Or else can you provide the requireJs config so that I can use the ui bootstrap library directly,instead of the one in jar.

jmmartinez84 commented 5 years ago

Take a look to this example

aritrabasu104 commented 5 years ago

@jmmartinez84 I dont think u have used it in grid,have you?

jmmartinez84 commented 5 years ago

Take a look to uiGridEditDatepicker directive in content.js It uses modernizr to check if browser have inputtype.date. If browser does not implements that functionallity, a bootstrap datepicker is rendered

aritrabasu104 commented 5 years ago

I am already using the bootstrap datepicker provided in w20. I dont have any intention of changing it.

jmmartinez84 commented 5 years ago

I just give you a sample code to help you to find a solution to your issue. That is a bootstrap datepicker into a ui-grid into a w20 project. Of course you can use what ever you want but I thought it would helps you.

aritrabasu104 commented 5 years ago

Thanks @jmmartinez84 , Can you please make a plunk of this? I am not able to see it in action.

aritrabasu104 commented 5 years ago

I am getting Modernizr is not defined This is my requireJs config, `"requireConfig" : { "paths": { "{jslib}":"ecop-ihm/jslib", "{bootstrap-datepicker}":"{jslib}/datepicker", "{modernizr}":"{jslib}/modernizr-custom" },

    "shim" : {
          "{jslib}/angular-bootstrap-datepicker": {
            "deps": ["{angular}/angular","jquery","{bootstrap}/js/bootstrap"],
                "exports": "angular-bootstrap-datepicker"
          }
      }
  }`

I am using the files provided in your git. I am not using npm/ bower for downloading the package,since All of required modules for my project are coming from depenedencies mentioned in pom.xml. How should I implement?

jmmartinez84 commented 5 years ago

Hi @aritrabasu104 I didn't use npm/bower for Modernizr library. I went to modernizr web page and built my own file. Then I put on lib folder. So you have to take that modernizr-custom.js and put it into a folder. Then you have to user requireConfig to load that library on your fragment. Take a look to Chrome console network tab and check if you set the correct path for the library.

aritrabasu104 commented 5 years ago

The newwork tab shows the fileNames, but their contents appear as html.. What am I doing wrong?

Sherpard commented 5 years ago

Check if you're not retrieving the Master page once again (That's a behavior on seedstack w20 plugin) and happens quite a while during the configuration of a new library