PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Element Date (Set default to today)

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML
View previous topic :: View next topic  
Author Message
SanderK



Joined: 01 Jul 2008
Posts: 13

PostPosted: Fri Jul 04, 2008 5:58 am    Post subject: Element Date (Set default to today) Reply with quote

Code:

$oForm->addElement('date', 'datDateTime','Date',
      array('minYear' => date('Y') - 1,
         'maxyear' => date('Y') + 1))


I searched in the Doc. and in the code and I didn't find an option to put in a default value. How can I set the date element to today??? At the moment it is showing 26. February 2007.

Thanks
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1013

PostPosted: Fri Jul 04, 2008 2:13 pm    Post subject: Reply with quote

The tutorial that I've linked in the other thread shows an example for using setDefaults() on date elements.
Back to top
View user's profile Send private message
SanderK



Joined: 01 Jul 2008
Posts: 13

PostPosted: Fri Jul 04, 2008 3:29 pm    Post subject: Reply with quote

Hey thank you very much. I tried for hours on my own.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software