authorization to select datetime in windows form
<p>i have datetimepicker on form , and 1 txtbox where we have name of users.</p>

<p>now i want allow superuser "sa" to access full calander, but i want normal user make entry with current date in system.
i have use following code but not working for me.
how to resloved this??
thanks in advace please help</p>

<pre><code>enter code here

        if (txtSupervisor.Text != "sa")
            {

                dateTimePicker1.MinDate = dateTimePicker1.MaxDate = DateTime.Now; 

            }
enter code here
</code></pre>
