RE: customized InputDateTag class

thumbnail
Madhava Reddy Solipuram, modified 14 Years ago. Junior Member Posts: 45 Join Date: 6/27/11 Recent Posts
Hi friends,

Is there any way to override functionality of InputDateTag.javafile.
I have one requirement in my project that is i have to disable the previous dates
when i using the input-date tag of liferay-ui.tld and i want to enable only dates from
today-onwards. If anyone overridden this functionality of InputDateTag.java file
please provide me the source code.
thumbnail
David H Nebinger, modified 14 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
I don't think this functionality has been implemented, but you may have more than just the one file that you'd have to overwrite/extend (I'd suggest extending rather than overwriting) to get this done. I mean, not only are you talking about the java code but also the javascript used to support the tag...

A simpler approach would be to validate that the date is not in the past in your portlet, rather than enforcing the requirement in the tag.
thumbnail
Madhava Reddy Solipuram, modified 14 Years ago. Junior Member Posts: 45 Join Date: 6/27/11 Recent Posts
Thanks for your replay,

I am searching for javascript file in the liferay directories. I am unable to find that javascript file.
In which location we can find that javascript file in liferay directories.
thumbnail
Jignesh Vachhani, modified 14 Years ago. Liferay Master Posts: 803 Join Date: 3/10/08 Recent Posts
Hi,
you can find all the liferay javascripts at \liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\html\js location.
thumbnail
Madhava Reddy Solipuram, modified 14 Years ago. Junior Member Posts: 45 Join Date: 6/27/11 Recent Posts
Thanks Jignesh,

I found the javascript files in tomcat server.
If you don't mind can you give me a solution to my problem.
I gone through entire calendar.js and calendar_setup.js i undestood something
in that files.
I am unable to find in which location i have to change javascript code to disable the
previous dates and enable the dates from today onwards.