Update Local Variables?

You seem to have a misapprehension about what code is being run
where: :onchange is a javascript fragment - you need to write a chunk
of javascript to do this. that chunk of javascript cannot do anything
to any ruby variables (other than by causing a request to be made).
The reason you get the error that you get is that ruby evaluates
start_date_time = $F, end_date = end_date_time[1,4] at the point that
your template is rendered and you presumably don't use a global
variable called $F.

I've never used calendardateselect and I'm not entirely sure what
you're trying to do, but either you need to do some client side stuff
or you need something in your action to preprocess what gets