Hi,

I'm new in lift and I'm playing around with an extended demo
application

I defined a date field (MappedDateTime) for a Mapper class which
should be presented as date only.

I would like to customize the date format when I generate a form with
the toForm method of the Mapper class.
The current state is that the content of the input field is formatted
via TimeHelper.toInternetDate.

What would the best (=easiest) way to do this

I tried already overriding "asHtml ":

e.g.

 object date  extends  MappedDateTime(this) {
    val dateFormat  = DateFormat.getDateInstance(DateFormat.SHORT)
    override def defaultValue: Date = new Date
    override  def  asHtml  =  Text(dateFormat.format(is))
  }

But it seems that it is not used in context of "toForm"

Could anybody of you give me a hint?

TIA

Regards,
Martin

BTW, is there a mechanism to format number / dates in an
internationalized way. E.g. in TimeHelper the format definitions of
the dates are hard coded. (I'm a Scala newbie and would and would not
know how to override this behaviour in a transparent way )

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to