This topic is locked

Question about Autoloading Date...

9/26/2007 7:55:26 PM
PHPRunner General questions
powersitedesign author

I have created a cms / blogging type solution for a client that they are beta-testing right now. Everything looks great and is apparently working well for them so far but they did have a request that I am kind of stuck on, they would like to have it so that the date is automatically entered into the input form as opposed to them having to go in and select the date on the calendar. (I know it's trivial but they are great clients). I have attempted a few hacks but none have really worked out for me. I was just curious if anyone had a snippet or suggestion that I might be able to try to do this. I didn't see anything preset in phpr that would magically make this happen.

J
Jane 9/27/2007

Hi,
to fill date field automatically use default values on the "Edit as" settings dialog on the Visual Editor tab.

powersitedesign author 9/27/2007

Hi,

to fill date field automatically use default values on the "Edit as" settings dialog on the Visual Editor tab.


Thanks, that did the trick. I added now() and it pulls up the current date automatically.

L
laonian 9/28/2007



Thanks, that did the trick. I added now() and it pulls up the current date automatically.


What if I only want the current date but not the time displayed? The time part is not shown correctly on my screen, it is like "9/28/2007 12:00:00 AM".

Alexey admin 9/28/2007

Hi,
make sure that your field database type is DATETIME, not just DATE.

L
laonian 9/28/2007

Hi,

make sure that your field database type is DATETIME, not just DATE.


Set the field to "short date", and it worked. Thanks.