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 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 -~----------~----~----~----~------~----~------~--~---