Fixes on Date forms and fields
This commit is contained in:
parent
0f000fff25
commit
35ebc0642b
3 changed files with 6 additions and 7 deletions
|
|
@ -16,7 +16,7 @@ class DateTimeField extends DateField
|
|||
public function __construct()
|
||||
{
|
||||
|
||||
$this->form='DateTimeForm';
|
||||
$this->form='PhangoApp\PhaModels\Forms\DateTimeForm';
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ class DateForm extends \PhangoApp\PhaModels\Forms\BaseForm {
|
|||
|
||||
$value=$this->default_value;
|
||||
|
||||
settype($value, 'integer');
|
||||
|
||||
if($value==0)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -4,17 +4,14 @@ namespace PhangoApp\PhaModels\Forms;
|
|||
use PhangoApp\PhaModels\Forms\DateForm;
|
||||
use PhangoApp\PhaModels\CoreFields\DateTimeField;
|
||||
|
||||
class DateTimeForm {
|
||||
|
||||
public $set_time=1;
|
||||
class DateTimeForm extends DateForm {
|
||||
|
||||
function form()
|
||||
{
|
||||
|
||||
$timestamp=DateTimeField::obtain_timestamp_datefield($this->default_value);
|
||||
// return '<input type="'.$this->type.'" class="'.$this->css.'" name="'.$this->name.'" value="'.$this->setform($this->default_value).'">';
|
||||
$this->default_value=DateTimeField::obtain_timestamp_datefield($this->default_value);
|
||||
|
||||
return DateForm($this->name, $class, $this->default_value, $this->set_time);
|
||||
return parent::form();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue