• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Putting Current Date in the Default field

Putting Current Date in the Default field 14 years 4 weeks ago #13205

On the Calender field, how do I set the default value to the current date?
The administrator has disabled public write access.

Re: Putting Current Date in the Default field 13 years 5 months ago #15427

Hi, i would like to know that too. Any news?
The administrator has disabled public write access.

Re: Putting Current Date in the Default field 13 years 5 months ago #15446

  • matt
  • matt's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 136
  • Thank you received: 14
Have you tried to enter code like this
//<code>
$today = date("j-m-Y");
return $today;
//</code>

Find the right format for the date here

Matt
The administrator has disabled public write access.

Re: Putting Current Date in the Default field 12 years 7 months ago #19158

  • MBaas
  • MBaas's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi,

being a brave dummy, I used the forum's search engine to answer my question and found this thread, but it did now answer my question :(
I'd like a date-field to default to Feb13, 2013 - how can I do that?

I entered the following as default value:
m/d/y
//<code>
$dt = new DateTime('2013/2/13');
return $dt->getTimestamp();
//</code>

The m/d/y in the first line is supposed to set the date-format...

Thanks for any suggestions :)

Michael
The administrator has disabled public write access.

Re: Putting Current Date in the Default field 12 years 6 months ago #19525

Here is the code I used in the default value field:

//<code>
return date('d M Y');
//</code>

Then I changed the format in the "Date format" property
The guys at rsjoomla put me onto this link which was helpful:
www.rsjoomla.com/support/documentation/v...e/57-components.html
Last Edit: 12 years 6 months ago by jpchennet.
The administrator has disabled public write access.

Re: Putting Current Date in the Default field 7 years 4 months ago #37616

I use the following code to show date and time like this in the right timezone:

//<code>
date_default_timezone_set('Europe/Amsterdam');
return date('d F Y; H:i:s');
//</code>

What you get is '4 december 2017; 09:15:03'.
The administrator has disabled public write access.
The following user(s) said Thank You: id3
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!