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.
Related
I use the dialog to display date range control. On Simulator before selecting the value dialog closes and I'm not able to change or update any value. Please see the code below. Please advise if there is any known issue.
This is probably related to this line:
range.setDisposeWhenPointerOutOfBounds(true);
When you start interacting with the Picker popup, it disposes the dialog because the pointer it outside the bounds of the underlying dialog.
I have made a change to Dialog that will be available in the next update on Friday that will fix this issue.
https://github.com/codenameone/CodenameOne/commit/2c5fbfc9ae06e35911b5832441a685724e9739a0
I have an angular-ui datepicker on my site which allows the user to select a delivery date. I'm disabling all dates in the past and all Sundays.
This works fine, the user cannot select a disabled date as expected so the control will never be invalid.
The problem comes when you go to edit the order after the chosen date has passed. The original date on the model is selected in the datepicker even though the date is disabled and the form will not submit because the datepicker is presumably setting $invalid internally and my form controller won't allow invalid forms to be submitted.
The documentation doesn't talk about any validators at all and I need a way of either switching them off (it should be enough that the user can't manually select a disabled date) or working round this issue.
Any help would really be appreciated.
The datepicker directive allows for turning off validation in the ngModelOptions - allowInvalid.
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.