I want to make date picker control disable in silverlight . date should be entered from code side . how to do ? any suggestions ?
you can use IsEnabled functionality of Silverlight DatePicker like follows
<control IsEnabled="false"/>
Related
I am working with Ext.Net 1.2
I am using Calendar control. I want to disable all previous date only calendar can enabled from today's date.
like Date Picker had functionality like MaxDate="<%# DateTime.Now %>".
Maybe you just need to call .DataBind() on the Control, or just set AutoDataBind="true".
Example
<ext:DatePicker runat="server" MaxDate="<%# DateTime.Now %>" AutoDataBind="true" />
Hope this helps.
I'm using the Silverlight Toolkit DatePicker control.
If an user enters an invalid format date for example foo/bar/2001 then the DatePicker automatically 'ignores' the date and sets it back to the last date.
This behaviour is fine, except I'd like to actually show the date in error to the user (not corrected) and display some validation message etc so the user knows what the issue is
Does anyone have a snip or sample I can use that works in this way?
Any help greatly appreciated.
You could handle the DateValidationError event. Calendar control in Silverlight using C# has a bit of sample code showing how the event handler could be wired up.
I am using codeplex wpf toolkit and want to show current date at the bottom of calendar same as date time picker of windows form shows, tried various properties but could not find a solution. Please help
If i understand you correctly,you want to show the current selected date in the calender part of the datepicker.For that you want to customize the control template of the Datepciker COntrol.Go through the link below to get started
http://msdn.microsoft.com/en-us/magazine/dd882520.aspx
Edit
To have a Today Button in the calender check the below thread
http://wpf.codeplex.com/discussions/85516?ProjectName=wpf
Is there any property , option available in the date picker control so that if user want to select today from any date from current date ?
e.g if user is view current month of last year then he has the option to select current date ?
just see this link and how they are implementing the Today button in the Datepicker WPF Toolkit). This link is from the WPFToolkit discussion forum. May be this will help you.
http://wpf.codeplex.com/Thread/View.aspx?ThreadId=85516
i think there is no option that there is a button directly in the control.
You can use a button outside the control, or something like this to set the current date.
Or you build a custom control....
I just hacked together a simple example. It is VS 2010. www.mbgr.de/CurrentDateWpf.zip.
No warranty at all on this one. Use at your own risk :-)
I am new to .NET 3.5 , WPF, infragistics and MVVM.
I have two calender controls and button control ( when clicking the button user see a list of events between the date range. We follow MVVM pattern
Start Date(Date Picker) 2. End date(Date Picker) 3. search button
My bussiness gave me some set of rules through which user will be validated.
I have done all validation for the date controls except for the following two:
when editing the date picker (manually with out using calender and typing the date) the change event is never recognized in View Model
Date picker is not allowing null values ( i need my one my date picker to be empty in page load).
If any body wants i can post my code also..
thanks
Divya
There is an ASP.NET version of the datepicker that allows nullable, found here on CodeProject. There was a similar question posted but it was for WinForms here. Ok, the code is for Winforms, maybe you might be able to port it for webforms i.e. asp.net.
Hope this helps,
Best regards,
Tom.