Cannot select current date when applying the JS date function in Date Element.

prutudom

New Member
Good afternoon,

I run into another problem when I want the user to select a today date from Date Element.
I use this JS code to filter the date.
It works when render the calendar, but the user could not click the current date.

Joomla 3 and Fabrik from GitHub.

I also have the validation for notempty as well.

In the Advanced Tab,
Using this JS code in Allow date function.

Code:
var diff = new Date().compare(new Date(date));
var result = (diff === 0) ?false : true;

When the user click on the calendar it will show with only today date for the user to click. However, when user click on today date the value in the field will not change at all. (Still blank)

Thank you very much.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top