reg date format

try to use an onClick event with JS and render what you need through
rjs to the second element.

You can use observe_field helper:
http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3APrototypeHelper/observe_field