Im not 100% sure what you're ultimately doing with this dropdown either.
But it looks like you're using the <input type="time"/> to let the user set the timerange (which includes various real-time timeranges), and then you're giving them a dropdown to manually control the timespan of a timechart command below somewhere.
Assuming that's correct, the span argument to timechart has no effect on the realtime vs historical nature of the search. That determination is already made when the timerange was picked in the <input type="time"/> element...
One note: is that the values and the order and the grouping of the entries in the time pulldown can actually all be changed and customized for a given app by setting different stanzas in times.conf. This may be overkill for you but it might be worth knowing.
Can you please clarify what you are doing? Is this picker choosing a bucket span for search results, or is it picking a time range for the search? It only makes sense to real-time if it is a range. (A bucket span in a RT search should be the same as a historical search.)
If it is picking a bucket span (suggested by span=XX), then could you instead just use the regular time picker and set bins=1 instead? I find that using either auto-bucket ranges in timechart or setting a number of bins works very well.