Edit Options for a date default.

QuestionsEdit Options for a date default.
Lindsay asked 9 years ago

Im trying to set a default date for a column.
The code below does not work. Any help appreciated.
Thanks!

$col = array();
$col["title"] = "Srt-Date";
$col["name"] = "ServiceDate";
$col["width"] = "4";
$col["search"] = false;
$col["editable"] = true; // this column is editable
$col["editoptions"] = array("size"=>20, "defaultValue"=>"2001-12-23");
$col["hidden"] = true;
$cols[] = $col;

1 Answers
Abu Ghufran answered 9 years ago

This code looks fine. I tested this on other file and it's showing default value when adding a record.

In your column options, you have set column to hidden,
$col["hidden"] = true;

You need to remove it to see the column.

Your Answer

7 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?