I'm using a framework that allows me to set the current date as the default value, but now I need to always show the date to yesterday, the code snippet as the value set is this:
$editor = new DateTimeEdit('datacadastro_edit', false, 'd-m-Y'); $editColumn = new CustomEditColumn('Data Cadastro', 'DataCadastro', $editor, $this->dataset); $editColumn->SetReadOnly(true); $editColumn->SetAllowSetToNull(true); $editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%')); $this->ApplyCommonColumnEditProperties($editColumn); $grid->AddInsertColumn($editColumn);
What I tried to do was this:
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'.' - 1 days'));
But the date displayed is today, I'm not exactly sure if this is the right way to do it.