jtsage / jtsage-datebox

A multi-mode date and time picker for Bootstrap (3&4), jQueryMobile, Foundation, Bulma, FomanticUI, and UIKit (or others)
http://datebox.jtsage.dev/
Other
474 stars 166 forks source link

datebox not working with angularjs #272

Closed xliyong closed 11 years ago

xliyong commented 11 years ago

Hi,

I am using datebox plugin with JQuery Mobile Angular Adapter, and it is not working properly.

1) setting useNewStyle=true : input field becomes readonly and invisible, though I can open the widget from console

2) setting useNewStyle=false: button is rendered and working. but css style is not applied and an extra div element is created.

http://jsfiddle.net/leyonh/UsYju/2/

xliyong commented 11 years ago

even with angularjs removed, and use plain jquery mobile with datebox, datebox is not accessible with useNewStyle=true. Did I miss something here ?

http://jsfiddle.net/leyonh/UsYju/4/

jnyrup commented 11 years ago

1) Boolean should not be quoted, so it should just be "useNewstyle":true.

xliyong commented 11 years ago

Thanks for quick reply.

1) Sorry, my bad. I missed that..

Do you have any idea about question 2 ? The adapter has a compilation phase before pagecreate event, and it may modify DOM before datebox creation. But I can't think of anything special about input element...

jnyrup commented 11 years ago

I don't have a solution for part 2. I did some testing and when patchJqmWidget() is called it returns false which seems to be causing the problem. My guess is that there needs to be made a custom jqmNgWidgetProvider() for jQm-datebox. To make such one I would contact the author of jquery mobile angular adapter.

ghost commented 11 years ago

Hi there! I've been trying (and stumbling) over the same issue (part 2). It would be great if this would work. Has anyone tried to contact the author (tigbro)?

ghost commented 11 years ago

Just to keep you guys up to date on this - the author of the angularjs adapter just confirmed that he will be trying to look into the issue. Just follow the reference-link above!

Cheers

tbosch commented 11 years ago

I found the problem and fixed it. With the latest build, he original jsfiddle is now working as expected: http://jsfiddle.net/UsYju/6/ Changes:

Could you double check? Tobias

prasadraja07 commented 10 years ago

zsfasf