AJAX :: MaskedEditValidator And MinimumValue Property - How To Set Dates
Feb 16, 2011
I have 2 scenarios here for using the MaskedEditValidator for a date field. I'll start with the easier one first.
1) I have a date field. I want to set the MaskedEditValidator's minimum value property to TODAY's date. So for example, if the user enter's a date earlier than today, the AJAX control will show a message stating "you can't input a date earlier than today".
2) I have 2 date fields - 1st one is 'start date' and 2nd one is 'end date'. I want to set the MaskedEditValidator for the end date so that the minimum value property is the date from the 'start date' field. So this way, the user can't enter a date in the 'end date' field that is earlier than what is in the 'start date' field.
Are these 2 scenarios possible? Or should I try another option (Javascript, Jquery, etc...)?
View 1 Replies
Similar Messages:
Dec 20, 2010
I am using the MaskedEditExtender and MaskedEditValidator, but have experienced some strange
behaviour. (See code example below). When entering a date into the textbox this is what I see:
1. The mask
2. Entering the date and time e.g. "19-01-1980 10:11:12"
3. When removing focus from the textbox the result is: "19-01-1980 19:01:19"
The six first digits of the date is copied as the time? If entering a day of the month larger than 23 and any given month, year and time (eg. 25-10-1980 12:12:12) the validation fails as the six first digits are copied to the time resulting in a time 25:10:19 which obviously is not valid.
I have downloaded the AJAX toolkit sample code and experience the exact same behaviour. When running the AJAX Toolkit samples from[URL] works fine!
Additinal info: Culture is danish (DateTime format is dd-MM-yyyy hh:mm:ss). Tried changing my systems culture to en-US but same behaviour.
Code:
[Code]....
View 5 Replies
Oct 13, 2010
have a C#/ASP.NET web application that contains DetailsView controls that are used for CRUD operations through the EntityDataSource and Entity Framework. Unfortunately I'm not sure which forum would be best to post this under, since I am wondering whether either the MaskedEdit AJAX controls or Entity Data Model could be configured to allow for this.ProblemThe Entity Framework requires time fields to be of time(7) data type, which must be entered as 24-hour time, with seconds (e.g. '09:30:00'). However, I want the time entered in 12-hour time and without seconds (e.g. '9:30 AM'). Is there a way I can configure the MaskedEditExtender and/or MaskedEditValidator to allow for this. What I was thinking is possibly using the AutoComplete portion of this control to fill in the remaining portions (i.e. seconds) that the user does not enter, but which the EF requires. Either that or can the Entity Data Model or something else be configured to allow for this?Existing Code
<asp:TemplateField HeaderText="Start Time" SortExpression="StartTime">
<EditItemTemplate>
<asp:TextBox ID="txtStartTimeEdit" runat="server" Text='<%# Bind("StartTime") %
[code]...
View 3 Replies
May 13, 2010
I'm trying to disable a MaskedEditValidator control through JavaScript.
The following approach works for other types of validors (RequiredFieldValidator) but doesn't seem to work for the MaskedEditValidator
[Code]....
View 2 Replies
Sep 22, 2010
i want to use a ajax calender extender in which when user clixcks on button caleder show only dates of current month not previous dates.i dont want to disable dates. i should not apper on current month calender. means it should start from 1 and end to 30 or 31
View 3 Replies
Mar 16, 2010
I have a panel, with several textboxes and an ImageButton inside of it. One of the textboxes has a MaskedEditExtender and a MaskedEditValidator associated with it. When I hit enter from any other textbox besides the one with the MaskedEditValidator the defaultbutton that is defined in the Panel's DefaultButton property handles the enter key.However, when I am in the textbox with the MaskedEditValidator, the first button on the form is receiving the enter key. Now, if I take the MaskedEditExtender off of the page, and just leave the MaskedEditExtender, everything behaves as it should.Can anyone offer any insight into how I may get this to work properly, or is this a known bug?I tried searching the forums and found a similar post, but no conclusion was ever reached.
View 3 Replies
Feb 6, 2010
I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and MaskedEditValidator to validate the phone.I have no problem with mask but the problem nothing happen when I enter for example only 3 number then lose the focus but as soon the focus on I will see the error message and it will disappear as soon as I write one number.
all what I want to get the error message if the user did not enter 9 numbers after lose the focus.
here is my code: <asp:TextBox ID="txtHomePhone" runat="server" ontextchanged="txtHomePhone_TextChanged"></asp:TextBox>
<cc1:MaskedEditExtender ID="txtHomePhone_MEExt" runat="server" TargetControlID = "txtHomePhone" Mask = "(999)999-9999" MaskType ="Number" AutoComplete="False"
[code]....
View 4 Replies
Sep 7, 2010
I have the following tabpanel (it actually contains a bit more content, but that content doesnt influence my issue):
[code]....
When I remote the MaskedEditExtender and MaskedEditValidator, it doesnt show that (undesired) behaviour anymore.Is there something special these controls do that cause them to refresh? Is there a workaround for this?
View 1 Replies
Jul 8, 2010
Something "weird" is happening with my ASP.NET application. I have a MasterPage with WebForms, and inside one of them, I have an ASP TextBox which is controlled by the MaskedEditExtender/MaskedEditValidator couple. Underneath, I have a GridView with 2 columns, an Edit ASP Command Field, an ItemTemplate which contains an ASP ImageButton with a Delete CommandName linked to a GridViewDelete Event through the OnRowDeleting attribute. The GridView is binded with SQL Server data while the page is loading.
It appears that once the page is loaded, if I want to delete a row by clicking on the ASP ImageButton, nothing appears. I have first to do something else with the GridView (raise an Edit Event for example), then it's accessible. I try different stuff to catch the source of the problem, and the "weird" part appeared when I deleted the MaskedEditValidator, just keeping the MaskedEditExtender : the Delete ASP ImageButton worked since the page loads!
View 2 Replies
Feb 19, 2010
So basically when i open the page i get the error above.
I've removed-added the toolkit toolbox.The error occurs p.e. in MaskedEditvalidator when i remove the mask from
MaskedEditExtender.Ok i know that it probably needs a mask and it crashes but what the hell is the
C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditCommon.cs ?? I don't even use c: for any project.Who is swalther?WTH?
And is there a MaskedEditCommon.cs in the toolkit?I did not find any MaskedEditCommon.cs in whatever, version library or whatever i downloaded.
Error:[ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex] System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490863 System.String.Substring(Int32 startIndex, Int32 length)
View 1 Replies
Jan 11, 2011
Where do I validate my date values prior to passing them as insert programs ?
I am trying to pass some Null dates.
In my property ?
[Code]....
[Code]....
[Code]....
View 2 Replies
Sep 8, 2010
It can only be used in RangeValidator MinimumValue?I need two texts to determine the minimum and maximum.
<asp:RangeValidator ID="RangeValidator1" runat="server"
ErrorMessage="Payment amount is too small!" ControlToValidate="AmountDeposit"
ValidationGroup="ErrormessageValidationGroup" MinimumValue="1" Type="Integer" Display="Dynamic">
[code]...
View 5 Replies
Dec 6, 2010
Is there a way to bind MinimumValue or MaximumValue of RangeValidator in it's own ErrorMessage declaratively (in .aspx file)?
I want to do something like
<asp:RangeValidator id="validator1" runat="server".... ErrorMessage="Please enter a value between <%# validator1.MinimumValue %> and <%# validator1.MaximumValue %> />
I would then set validator1.MinimumValue or validator1.MaximumValue in PageLoad, because I get those values from a database.
View 3 Replies
Feb 4, 2011
[Code]....
The following setup seems to work fine on the client side, however when I post back and check Page.IsValid, the value is false. I also looked at mevDate.IsValid and it's false. It seems that setting the CultulreName on the MaskedEditExtender is sufficient to get the MaskedEditValidator to emit the correct JavaScript, but on the server side of things it doesn't work. When I flip CultureName to "en-US" everything works as expected.
View 3 Replies
Dec 4, 2010
If i have three textboxes in my vb.net webform.
Textbox1.text="Sumit"
Textbox2.text="4-Dec-2010"
Textbox3.text="1-Jan-2011"
I want if dates selected are in between textbox2 dates and textbox3 dates then textbox1.text="sumit" else textbox1.text="No dates"
View 1 Replies
Jan 31, 2011
I am using ajax calendar extender to select the dates.I want to disable all the dates less than today. Means the user can't select those previous days ie the dates should be shown in grey color and users can't select it.
View 6 Replies
Nov 4, 2010
I need some pointers to start on this.We are building a time off application where three instances of a calendar control will be displayed ( prev - current and next month) now users can click on various dates accross all three instances and then a count of number of days should be diaplyed in the parent textbox.
To begin with this, i started with adding the dates clicked by the user in Calendar2_SelectionChanged method into a list<> so that i can get the all dates user clicked and then add it to calander's selected dates collection. But this throws an e" object reference not set" error.
Is there anyother way to get all the dates that user click onthe calendar( note the dates doesn't get highlighed so seleteddates doesnt work)does anyone has a good example for this.
View 2 Replies
Jan 13, 2011
once a user select an item from dropdownlist > Dates from DB are shown on calendar in pink color.
The problem now is when i want to select new dates the selected dates(in pink) become deselected .. I want them to stay selected so i can know which dates are already used .
[Code]....
View 5 Replies
Feb 20, 2010
Well i cannot find a solution,so..
I will post my code.The problem is that whatever date i try (i use greek d/m/y but i also tried m/d/y) it gives me the "error!" tooltip.
I've tried complex code,simple code, ValidationExpression,Globalization,no globalization.Nothing works.
Anyway to it's simplest form:
Code:
[code]....
View 10 Replies
Jan 21, 2010
i have to date say in MM/DD/YYYY format "1/1/2010" and 1/30/2010". now i want to find dates which comes on monday. so out out will be 01/04/2010, 1/11/2010, 01/18/2010, 01/25/2010
View 2 Replies
Sep 17, 2010
I am generating multi-series graphs with the date along the X-Axis. The problem is that not all of the series in the graph have the same dates in the date range. Meaning that if I choose 1 Feb through 30 Apr that one series may have data that starts at 1 Feb but only goes through the end of March but another series may have data for the entire date range. This skews the charts I need to create. Go, given the date range taken at the begining of the query I'd like to generate a list of dates and populate the data to be graphed, padding those series with 0's for those dates that have no data.
View 3 Replies
Mar 14, 2011
I want to use MaskedEditExtendor and MaskedEditValidator togather to perform validation for USA phone number.
My aspx code is below.
[Code]....
View 4 Replies
Sep 15, 2010
i want to disable the last day and last month dates in this control?
View 4 Replies
Jun 12, 2010
I am currently using a maskedEditValidator to do some validation checks in a field, everything works great until I attempt to insert a maximium value. My current maskededitvalidator looks like this:
[Code]....
When I add the maximium value into it, it pops up on the details view and will not go away thus not allowing for the new record to be entered. From what I have seen through various other post is that this is a know bug in the maskededitvalidator, and that if I want to do this to do it in a custom validator. My problem is I have no clue as to how to do this in a custom validator.
View 3 Replies
Apr 13, 2010
I am quite new to the toolkit and have run into a problem where I have an ASPX page with 3 textboxes linked to calendar extenders. I have a ImageButton to populate the textboxes with the date, but the 2 problems occur:1. The date appears correct in the textboxes, but I am getting an error saying a sting to date conversion error occured.2. When saving my data using the UATDate_CalendarExtension.SelectedDate value, the date in the text box is not saved, it keeps the previously saved date.
View 3 Replies