Friday, October 31, 2014

How to disable a button when a time arrives?

Hello folks,


Could anyone please help me with a task? I have been thinking of it for some time now, but have no idea how to accomplish it.


I am using c# in VS 2008. I have a new requirement for a .NET application. Users have to enter information to a form every day. I need to know how to disable a button when the time arrives, e.g. let's say it is 10/30/2014 0.00 AM, the user can hit the button to save changes in the form until it is 10/30/2014 10.00PM. After that time, the button will be disabled so s/he won't be able to save changes. The button should be enabled again since 0.00 AM for the following date: 10/31/2014 and again, should be enabled until 10/31/2014 10.00 PM, and so on. For all dates before the current date the button must be disabled too.


Thank you very much for your help. I really appreciate it.


Marco


No comments:

Post a Comment