martin-g / wicket-bootstrap

Apache Wicket components for Twitter Bootstrap - Wicket-Bootstrap is based on Twitter's toolkit (bootstrap) and the Apache Wicket Framework.
https://wicketbootstrap.teliclab.info/
296 stars 162 forks source link

Tempus Dominus Date time picker not working #1066

Closed x-paphio closed 7 months ago

x-paphio commented 7 months ago

Datetimepickerwithicon is marked @deprecated. Trying to migrate to tempus dominus (V6) I get a null reference error. Debugging shows that tempus-dominus.ts crashes on_initiazeToggle line 477.

In my case (see attached example) this.optionsStore.element is my picker (id = schedulesOn) and query = "[data-td-toggle="datetimepicker"]" but the item is the sibling span found in AbstractTempusDominusWithIcon.html. So line 480 is looking inside input and finding nothing. Should it be layout differently, because I presume wicket-bootstrap is not the source of tempus-dominus.ts.

I've attached an example (wicket demo app) with a date time picker in it. You can comment/uncomment both type of datetime picker to test testjetty.zip

solomax commented 7 months ago

hello @x-paphio, I'll try to check :)

solomax commented 7 months ago

@x-paphio to fix your example you need to edit HomePage.html

and do following change:

<!--input wicket:id="scheduledOn" type="text"></input-->
<div wicket:id="scheduledOn"></div>
x-paphio commented 7 months ago

@solomax thanks a lot. Everything seem to work now.