SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    North Wales, UK
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    datetime_select - setting defaults?

    I have a datetime field in my database, and in the form I have a datetime_select element for controlling this. When editing a record, this works great, however I can't work out how to set a default time when creating a new record. It defaults to the current date/time.

    Is this something I can do in the form itself, or do I need to somehow set a default value in the object? Or will I have to use select_datetime instead?

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I plan on looking at the source about this later but for now a quick fix you could do is set a default value for the variable that you use for the tag if it is empty...
    Happy switcher to OS X running on a MacBook Pro.

    Zend Certified Engineer


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •