Closed PhilippMeissner closed 6 years ago
Can you please try with the master branch of the repo?
The lamba will receive 2 params : the column object itself and the formated_value :
def validate_date
->(column, formated_value) { is_valid_date?(column.search.value) ? column.table[column.field].matches("#{column.search.value}") : false }
end
A new release with this fix is coming.
Hi,
I want to enable datatable search for the DateTime column of my model. Within the view the date is displayed as
1. November 2017
. If possible I'd like the search input to allow either searching for this very string (or parts of it), or at least define the format (likedd-mm-yyyy
oryyyy.mm.dd
, something along the lines).This is my HTML setup:
My coffeescript options hash:
My DatatableClass:
Unfortunately within my Proc the
column
isn't the actual column, but my input value. This causes the following error:undefined method
search' for "The string that I entered":String`So my questions: 1) Can I search for a DateTime value? 2) Can I define the format for which to search? 3) How to use the Proc properly?
Regards Phil