I would urge you to use the datepicker tool, it is easy to configure and looks nice
- also there are lots of options you can set, like limiting the date range etc, so you should be able set it to default to the current date easily enough.
Re the function, you don't need to change anything
all you need to do is call the function, putting in your date field as a parameter.
the function in question expects an input date in the format dd/mm/yyyy and will produce a date in the format yyyy-mm-dd
so all you need to do is change the line in the update query like so
If your date format in the field is different to dd/mm/yyyy then you will need to change the function which manipulates the string accordingly, whatever the start point is, the result should be in the format yyyy-mm-dd
Hope that helps