mikemiranda Posted March 10, 2014 Share Posted March 10, 2014 Hello guys, sorry for my english i am using a module that allow the client to become a seller, i want to automatically set the available date to 7 days from current date and disable the field (easy part). Can anybody know how to get the current date and add some days on the tpl file? or it needs another modification? Thanks in advance Link to comment Share on other sites More sharing options...
math_php Posted March 11, 2014 Share Posted March 11, 2014 Hello, If you find the template you can modify it like that : {literal} jQuery(function($){ var d = new Date(); d.setDate(d.getDate()+7); $('#id_of_input_available_date').value(d.toLocaleDateString()); }); {literal} Of course you have to modify it to fit with id in your tpl and date format expected by the module. This is a way to do it, modifying php in module could also,perhaps, do the job. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now