Re: DateTimeField question

2008-03-29 Thread Ryan Gravener
Do you want the component or whether or not its a am or pm?

MutableDateTime mdt = new MutableDateTime(startField.getModelObject());

mdt.set(DateTimeFieldType type, int value);

startField.setModelObject(mdt.toDate());

http://joda-time.sourceforge.net/api-release/org/joda/time/MutableDateTime.html

On Sat, Mar 29, 2008 at 12:47 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
 Sorry, got confused with DateTextField.. DateTimeField indeed has this
  AM_PM stuff.

  2008/3/29, Martin Makundi [EMAIL PROTECTED]:


  What is AM_PM? At least 1.3.1 does not have such feature. I would
rather use java.util.Calendar to figure out internals of the
startField.getModelObject() which should be a date.
  
**
Martin
  
2008/3/28, Pinger [EMAIL PROTECTED]:
  
   
  So I am a noob with Wicket.. so I have a dumb question..


  I have a DateTimeField

  I do this

  DateTimeField  startField = new DateTimeField(starttime, new
  PropertyModel(properties, starttime));
  form.add(startField);

  Ok I want to be able to set and get this field.. I can do that with
  everything.. but AM_PM

  this does not work

  AM_PM amOrPm = startField .getAmOrPm();

  Please help.. pulling my hair out.

  Thanks

 --
  View this message in context: 
 http://www.nabble.com/DateTimeField-question-tp16359499p16359499.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Ryan Gravener
http://ryangravener.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DateTimeField question

2008-03-28 Thread Pinger

So I am a noob with Wicket.. so I have a dumb question..


I have a DateTimeField 

I do this 

DateTimeField  startField = new DateTimeField(starttime, new
PropertyModel(properties, starttime));
form.add(startField);

Ok I want to be able to set and get this field.. I can do that with
everything.. but AM_PM

this does not work

AM_PM amOrPm = startField .getAmOrPm();

Please help.. pulling my hair out.

Thanks
-- 
View this message in context: 
http://www.nabble.com/DateTimeField-question-tp16359499p16359499.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DateTimeField question

2008-03-28 Thread Martin Makundi
What is AM_PM? At least 1.3.1 does not have such feature. I would
rather use java.util.Calendar to figure out internals of the
startField.getModelObject() which should be a date.

**
Martin

2008/3/28, Pinger [EMAIL PROTECTED]:

  So I am a noob with Wicket.. so I have a dumb question..


  I have a DateTimeField

  I do this

  DateTimeField  startField = new DateTimeField(starttime, new
  PropertyModel(properties, starttime));
  form.add(startField);

  Ok I want to be able to set and get this field.. I can do that with
  everything.. but AM_PM

  this does not work

  AM_PM amOrPm = startField .getAmOrPm();

  Please help.. pulling my hair out.

  Thanks

 --
  View this message in context: 
 http://www.nabble.com/DateTimeField-question-tp16359499p16359499.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DateTimeField question

2008-03-28 Thread Martin Makundi
Sorry, got confused with DateTextField.. DateTimeField indeed has this
AM_PM stuff.

2008/3/29, Martin Makundi [EMAIL PROTECTED]:
 What is AM_PM? At least 1.3.1 does not have such feature. I would
  rather use java.util.Calendar to figure out internals of the
  startField.getModelObject() which should be a date.

  **
  Martin

  2008/3/28, Pinger [EMAIL PROTECTED]:

 
So I am a noob with Wicket.. so I have a dumb question..
  
  
I have a DateTimeField
  
I do this
  
DateTimeField  startField = new DateTimeField(starttime, new
PropertyModel(properties, starttime));
form.add(startField);
  
Ok I want to be able to set and get this field.. I can do that with
everything.. but AM_PM
  
this does not work
  
AM_PM amOrPm = startField .getAmOrPm();
  
Please help.. pulling my hair out.
  
Thanks
  
   --
View this message in context: 
 http://www.nabble.com/DateTimeField-question-tp16359499p16359499.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]