Updated rangepicker so it can be used on multiple inputs without duplicate code.