I am using MVVM pattern in my application. I have some issues where to handle the events of Usercontrol.
I have a user control which is called DatePicker contains two textboxes(for start date and end date), and button which fetch data from model for particular range of date.
When I focus any of the textboxes I need to change its border color(say Green). When user enter wrong date value again I need to change the border color with Red.
If user enter wrong date values then I need to disable the button also.
What is the best practice to handle these events?
Thanks in advance.
Note: I modified the application in such way that, the user can enter date manually also, when the start date textbox is focused Calendar will be shown as a popup and when he/she focused end date textbox again Calendar will be shown with blocking the dates which is selected/typed in start date text box.
Sorry for late edit.