On 25 January 2013 21:25, Christian Steinebach < [email protected]> wrote:
> Hi Dan, > Hi Christian, sorry for not replying on this thread, been busy writing articles and stuff ;-) > > There are some files which have to do with date and time in > > /component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jodatime > but they seem do more or less the same thing. > In > /core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/value/datetimejoda/JodaDateTimeValueSemanticsProviderAbstract.java > it's called datetime, but the time part is zeroed or not part of any > format string. > > Could an org.apache.wicket.extensions.yui.calendar.DateTimeField be used > for it? > As far as I can see in the source code you don't use DateField but use a > DatePicker directly to pop-up the calendar control. > Could DateTimeField be used directly? It has calendar pup-up and time > field baked in. > Yup, I think you've figured it right. It looks like pretty much everything else is done, just the wrong widget is used in the wicket components. So, the thing to fix, as I see, is that right now ScalarPanelTextFieldDatePickerAbstract is used as the superclass to all of JodaDateTimePanel, JodaLocalDatePanel and also JodaLocalDateTimePanel. It really should only be the superclass of the middle of these. As you say, the other two ought to use a different widget such as org.apache.wicket.extensions.yui.calendar.DateTimeField. While on this topic, the other thing I'm not completely clear on myself (that is, I figure this out then keep forgetting) is the significance - or not - of the "Local" bit. You can probably ignore this for now, but I suspect we'll need to revisit in the future. > Anyway, I couldn't figure out which files 'make it happen' that a > LocalDate field appears on the screen... :-| > If you could give me some hints on what to look for and how to implement a > control I could give it a try to add a DateTimeField... > > HTH - a contribution providing the fix would be most welcome! Dan > Christian > > > ________________________________________ > From: Dan Haywood [[email protected]] > Sent: Friday, January 25, 2013 3:02 PM > To: [email protected] > Subject: Re: DateTime? > > Hi Christian, > > Jeroen and I only added in Joda time in the last few months, and we haven't > had a requirement of our own (yet) to have LocalDateTime as well as > LocalDate. So I don't think it's there. Certainly I don't remember adding > a suitable widget within the Wicket viewer. > > By all means raise a JIRA issue for this; even better, if you have the > time, then I can give you some guidance on how to contribute this feature > back in. > > Cheers > Dan > > > On 25 January 2013 13:50, Christian Steinebach < > [email protected]> wrote: > > > Hi everybody, :-) > > > > whatever I choose as a property typeDate, DateTime, LocalDate or > > LocalDateTime > > it ends up as a date entry with a yui calendar and no possibility to add > a > > time. > > Am I doing anything wrong (I only changed the type)? > > > > Christian >
