And the date_time's value is always
date_time=Thu, 1 Jan 1970 00:00:00 UTC,
Thanks very much!
Cheers,
Neil
On Oct 28, 12:27 pm, "Neil.Lv" <[email protected]> wrote:
> I print the S.attr and get something like this: ...Left(form)..
> println(S.attr)
>
> And how can i get the form value from the form that posted to the
> server.
>
> I can't get the date_time value via the DatePicker.
>
> Thanks for any help!
>
> Cheers,
> Neil
>
> On Oct 28, 9:17 am, "Neil.Lv" <[email protected]> wrote:
>
> > Hi all,
>
> > I use the datepicker to chose the date, and the value is missing
> > when posted to the server.
>
> > 1:
> > This is some code:
>
> > ### In the model
> > object date_time extends MappedDateTime(this) {
> > final val dateFormat =
> > DateFormat.getDateInstance(DateFormat.SHORT)
> > override def asHtml = Text(dateFormat.format(is))
> > }
> > ...
>
> > bind("e", form,
> > "date_time" -> text("", date = _) % ("size" -> "10") % ("id" ->
> > "entrydate"),
>
> > "submit" -> submit(S.??("add"), checkAndSave))
> > ###
>
> > ### in the html page
> > <head>
> > .............
> > <head>
> > <tr>
> > <td>date_time:</td>
> > <td><e:date_time eid="entrydate" live:maxlength="10">date_time</
> > e:date_time></td>
> > </tr>
> > ...
>
> > <script type="text/javascript">
> > $(function() {
> > $('#entrydate').datepicker({dateFormat:'yy/mm/dd'});
> > });
> > </script>
> > ###
>
> > When the submit button clicked, the date_time doesn't have the
> > value . --> text("", date = _)
> > ###
> > "date_time" -> text("", date = _) % ("size" -> "10") % ("id" ->
> > "entrydate"),
> > ###
>
> > 2: I want to save the date_time into the database and the format is
> > like this, 2009-10-27 13:38:11,
>
> > but the DatePicker only contains the date not the time, How can i
> > achieve this purpose ?
>
> > ###
> > object created_at extends MappedDateTime(this) {
> > override def defaultValue = new Date()
> > }
> > ###
>
> > Thanks for any suggestion !
>
> > Cheers,
> > Neil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---