Revert "Remove data_provide
and data_date_format
attributes"
This reverts commit 273b3f2faf
.
This commit is contained in:
parent
ccad372036
commit
469aca999b
11 changed files with 51 additions and 16 deletions
|
@ -17,6 +17,15 @@ class Champ < ActiveRecord::Base
|
|||
mandatory
|
||||
end
|
||||
|
||||
def data_provide
|
||||
return 'datepicker' if (type_champ == 'datetime') && !(BROWSER.value.chrome? || BROWSER.value.edge?)
|
||||
return 'typeahead' if type_champ == 'address'
|
||||
end
|
||||
|
||||
def data_date_format
|
||||
('dd/mm/yyyy' if type_champ == 'datetime')
|
||||
end
|
||||
|
||||
def same_hour? num
|
||||
same_date? num, '%H'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue