Default value for date field

  • Thread starter Alisher H. Abdurahmanov
  • Start date
A

Alisher H. Abdurahmanov

Hello.
How to set default value for date field according to the next
requirement: "today() + 7 days"? Is it possible without writing
code?
 
V

virgul

go to poperty of the object in the value select Fx and insert a
function and select today() and in the box type :

mychamp1 (today()+7)
 
A

Alisher H. Abdurahmanov

go to poperty of the object in the value select Fx and
insert a function and select today() and in the box type:
mychamp1 (today()+7)

Huh! Do you jeer at me? What's mychamp1? :)
 
V

virgul

no sorry but try to customize this jscript code to have the good day:

function getDateString(oDate)
{
// Use today as default value.
if (oDate == null)
oDate = new Date();

var m = oDate.getMonth() + 1;
var d = oDate.getDate();

if (m < 10)
m = "0" + m;

if (d < 10)
d = "0" + d;

// ISO 8601 date (YYYY-MM-DD).
return oDate.getFullYear() + "-" + m + "-" + d;
}

Like the linuxboy say Have a Lot of Fun!!!

++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top