D
D
dro1d2016-02-10 15:41:39
Yii
dro1d, 2016-02-10 15:41:39

How to save date with datapicker in Yii?

In my Yii projects, I always stored the date in Int in Unix date format. Decided to use datapicker. It stores the date as a string like "02/06/2015". What is the best way to implement date storage if using Datapicker?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2016-02-10
@VladimirAndreev

there are behaviors for YII ..
I, at one time, was a getter / setter of rules (but, without it, it was complicated for me, with many comparisons and data display in a form different from storage)

A
Alexander, 2016-02-10
@p0vidl0

Alternatively, you can use the format validator .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question