Igor had a good idea, which was to implement the date picker as a behavior rather than a component. This makes it a lot nicer to use. Instead of instantiating it with the target field:
add(new DatePicker("datePicker", dateTextField);
and having to have it defined in your markup:
<div wicket:id="datePicker" />
you can now simply do:
dateTextField.add(new DatePicker());
Thanks for the idea Igor! You can find this behavior in the wicket-datetime project. Oh, and though the date picker doesn’t need the AbstractCalendar component anymore, I’ll keep it around in case people want to create components based on the YUI Calendar widget.
That’s great idea. Just one note – would be very nice if you vould create some wicket page with list of such changes / improvements in framework, so it can be easily found and followed.
Sorry – I’ve meant wiki page (somehow I see wicket everywhere …)
I will, once we have a release for that project.
Hi there, I’ve been attempting to use the new DatePicker component. While our designers have taken the default CSS styles, and then modified them to our look and feel, I’m finding it difficult to actually apply the CSS styles. Because the JS and CSS are loaded dynamically by the behaviour, they override any styles included on the page. Could you offer some advice on how to solve this issue?
Hi Colin,
Such questions go best to the mailing list. Gerolf has been maintaining this project the last few months, and other people might have an opinion about this as well.