support the mode switch button

*Also fixed the date issue in function sort_to_digit()