Validation - Rangevalidator For Calendar Extender Entries In Safari?

Mar 24, 2010

I have the following scenario:

arrival and departure dates have to be selected on a form, through 2 textboxes with a calendar extender each.

I validate the entries to check that no date before today is selected and to check that the departure is after the arrival. I used a rangevalidator and a comparevalidator.

In IE, Firefox and Opera it is working fine, in Safari (on windows) however both the validators go off even on entries that should be accepted.

It makes me suspect that the date format dd/MM/yyyy causes trouble for Safari.

(the dd/MMMM/yyyy also gave the same troubles in the other browsers, probably due to the dependency on UIculture)

The code is:

<tr>
<td>
<asp:TextBox ID="txtArrive" runat="server"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="txtArriveWatermarkExt" runat="server"
Enabled="True" TargetControlID="txtArrive" WatermarkText="arrival date">
</cc1:TextBoxWatermarkExtender>
<cc1:CalendarExtender ID="ArriveCalendarExt" runat="server"
CssClass="MyCalendar" Enabled="True" Format="dd/MM/yyyy"
TargetControlID="txtArrive">
</cc1:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtArrive" ErrorMessage="please select arrival date"
Text="*" ValidationGroup="date" Display="none"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ErrorMessage="please make sure that your arrival date is later than today and not later than a year from now"
ControlToValidate="txtArrive" Type="Date" ValidationGroup="date" Text="*"></asp:RangeValidator>
</td>
<td>
<asp:TextBox ID="txtDepart" runat="server"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="txtDepartWatermarkExt" runat="server"
Enabled="True" TargetControlID="txtDepart" WatermarkText="departure date">
</cc1:TextBoxWatermarkExtender>
<cc1:CalendarExtender ID="DepartCalendarExt" CssClass="MyCalendar" runat="server" Enabled="True"
Format="dd/MM/yyyy" TargetControlID="txtDepart">
</cc1:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtDepart" ErrorMessage="Please select departure date"
Text="*" ValidationGroup="date"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator2" runat="server"
ControlToCompare="txtDepart" ControlToValidate="txtArrive"
ErrorMessage="your departure date has to be later than your arrival date"
Operator="LessThan" Type="Date" Text="*" ValidationGroup="date"></asp:CompareValidator>
</td>
<td>
</td>
</tr>

The range validator gets its values in code behind on Page_load

RangeValidator1.MinimumValue = DateTime.Now.AddDays(1).ToShortDateString();
RangeValidator1.MaximumValue = DateTime.Now.AddMonths(12).ToShortDateString();

View 1 Replies


Similar Messages:

Web Forms :: Validation Caused By Calendar Extender?

Aug 18, 2010

I have a calendar extender for a text box. I have set the text box 'causesvalidation' to false.

I have several other cntrols with required field validators. When I click the popup image for the calendar extender, rhese other required field validators show their error messages.

View 4 Replies

AJAX :: Age Validation When Date Of Birth Is Selected In Calendar Extender Control

May 25, 2013

I have a textbox to input DOB,i used ajax calendar to enter DOB,what validation expression should i use so that user below age 15 cannot get registered...

View 1 Replies

Web Forms :: Send Entries Local Outlook Calendar?

Jul 23, 2010

I use the following code to send entries to the local outlook calendar. Is it possible to do something like this for Google calendars as well?

[Code]....

View 1 Replies

Forms Data Controls :: RangeValidator Validation Occurs On CancelCommand?

Jul 24, 2010

RangeValidator validation occurs on CancelCommand

[Code]....

View 2 Replies

Mobiles :: ModalPopup Extender And Safari?

Jul 15, 2010

Does anybody have experience using ModalPopup extender in iPhone/Safari? I added a ModalPopup and when I click on the button it does not run my server side code. I am sure that I did everything correctly and the same code works just fine in IE and Chrome. Here is a chunk of the code:

[Code]....

andProtected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

View 1 Replies

AJAX :: AJAX Calendar Extender - Make Calendar Disappear When Another Calendar Opens?

Nov 17, 2010

I am using Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.I am using 2 Ajax Calendar Extender in my page. I am using a text box and html image control and setting the TargetControlID to the test box id and the PopupButtonID to the image control name. When i click the first image the calendar pops up and without choosing a date if i click the second image the second calendar control opens on top of the first calendar control. Is there any way i can make the previous one disappear without choosing a date leaving the calendar control associated with the last image clicked.

View 2 Replies

Validation - Using RangeValidator To Validate User Input On Client Side For Double Values?

Feb 4, 2010

I was using RangeValidator to validate user input on client side for double values.One of my user said that when he enters 5E-10, my range validator does not understand that number as a valid double.

View 1 Replies

AJAX :: Modal Popup Extender Hides Behind Svg On Safari?

Dec 14, 2010

when i click a button, the ajax modal pop up should float above the svg, which is a image object that formated as xml file underneath. it works all fine in IE and Firefox, but it's not working in safari.

In safari, the modal pop up is behand the svg rather than float on the svg, so far i had use the z-index and position in front end control, but none of them are working, the below is my aspx code:

table that holds the svg object:

[Code]....

table that has the modal pop up:

[Code]....

View 7 Replies

AJAX :: Using AJAX Calendar Extender Instead Of Calendar Control Possible On ASPX Page?

Jul 15, 2010

Currently, I am using Calendar control on ASPX page. Instead, I want to use AJAX Calendar Extender control because of the animation effect and the way it moves between years making if much more impressive than Calendar control.Is it possible to display Calendar extender on page permanently, just like Calendar control?

View 2 Replies

VS 2008 Why JQuery Selectors Are Failing Inside Validation Method For Chrome/Safari

Mar 15, 2011

I have a CustomValidator client script method that checks the value of a <input type="date" id="start"/> control. I'm accessing the date value using jQuery $('#start').val(), which works fine in Firefox and Opera. When I test in Chrome/Safari, the js console says that $('#start') is null. There is no problem using $('#start') outside the CustomValidator client method in Chrome/Safari. There is also no problem accessing the #start date object via document.getElementById('start') inside the validation method.

why jQuery selectors are failing inside this validation method for Chrome/Safari?

View 1 Replies

Calendar Extender Won't Pop Up A Calendar

Aug 16, 2010

I currently have two calendar extenders on my ASP page and for some reason when they are clicked they do not pop up correctly, I have the TargetControlId set to the appropriate text boxes and the PopupButtonId set to the correct images as well. Is there something else that needs to be set so that this works correctly?

View 1 Replies

Use Calendar Extender In MVC?

Feb 22, 2010

I love the calendar extender, but I am unable to use it in my MVC app. How do I connect the calendar extender to a textbox in MVC... or add the extender at all for that matter? Old Way.

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
...
<asp:TextBox ID="txtDate1" runat="server" ValidationGroup="DateCheck">
</asp:TextBox>
...
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
...
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDate1">
</cc1:CalendarExtender>

View 4 Replies

Calendar Extender In .net C#?

Dec 21, 2010

i am using a calender extender control in my asp.net web application. i want to disable this control while clicking inside a text box. i am also using HtmlEditor(ajax control)inside the same web page and i have only one script manager. i have done the following coding in order to get a calenderExtender in a text box.When i compile the programme i dont get any errors but when i click inside a text box the calenderExtender does not apear on a web page.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="before_adm.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>[code].....

how will i get a calenderExtender on click in a textbox.

View 1 Replies

How To Get The Value Of The Calendar Extender Control

Aug 18, 2010

How do you get the value of the Calendar Extender control? I always get a blank value in the txtTo textbox and the calendarTo.SelectedDate doesn't work (it always gets the initial value of the selected date).

Code:
<asp:AjaxToolScriptManager runat="server" EnablePartialRendering="true"></asp:AjaxToolScriptManager>
<asp:UpdatePanel runat="server"><ContentTemplate>
asp:TextBox ID="txtTo" runat="server" ReadOnly="true"
CssClass="text"></asp:TextBox>
[code]...

View 8 Replies

Textbox Calendar Extender In A Gridview?

Feb 18, 2011

I have a a gridview with a number of columns, each column has a textbox with a calendar extender attached. The problem comes when i click on the popup button, it opens a calendar for each row in the column at the same time. So if there are four rows, it will open 4 calendars. How do i make it only open the one for the specific row i am working with?

[code].....

View 2 Replies

AJAX :: Client PC Can't Pop Calendar Extender

Sep 16, 2010

I have some aspx pages where I was using a date picker. I changed the date picker with AJAX calendarextender which I can pop by clicking on the associated textbox when I am viewing this page on the server itself. But on the client PC I can't pop the calendar. This textbox and calendarextender are created in a gridview.

<asp:GridView id="EmpList" runat="server" Caption="Employee Personal Data"
AutoGenerateColumns="False" DataKeyNames="RECID, ENumber"
AutoGenerateEditButton="True"
DataSourceID="EmpData"
allowsorting="true">
<columns>
<asp:BoundField HeaderText="E/Number" DataField="ENumber" sortexpression="ENumber" readonly="True"/>
<asp:BoundField HeaderText="E/Name" DataField="EName" sortexpression="EName"/>
<asp:TemplateField HeaderText="Date Joined" sortexpression="DOJ">
<ItemTemplate><asp:Label ID="lblDOJ" Runat="Server" Text='<%# Eval("DOJ", "{0:d}") %>' /></ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDOJ" runat="server" Columns="8" text='<%# Eval("DOJ", "{0:d}") %>' ReadOnly="True"></asp:TextBox>
<asp:CalendarExtender ID="txtDOJEx" runat="server" TargetControlID="txtDOJ"></asp:CalendarExtender>
</EditItemTemplate>
</asp:TemplateField>
</columns>
</asp:GridView>
</code>

Is there anything that I am missing?

View 4 Replies

AJAX :: Use A Calendar Extender On A Textbox

Feb 7, 2010

i want to use a calender extender on a textbox, but it doesn't do much.

View 7 Replies

AJAX :: Calendar Extender Within FormView?

May 5, 2010

I have downloaded the AJAX Toolkit for .Net 3.5 I want to add a calendar popup for a field called Date Finished, I added the ScriptManager from the AJAX Extensions toolbox, and then I went into the source for Edit Mode on my webform, and added in the CalendarExtender. I get no error messages when compiling or running this, but the calendar does not pop up.

[Code]....

View 6 Replies

Ajax Calendar Extender Not Working?

Jun 1, 2010

I've made a new project with one page and a reference to AjaxControlToolkit.dll

The calendar extender below doesn't work, what have I done wrong?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender runat="server" TargetControlID="TextBox1" CssClass="ClassName" Format="MMMM d, yyyy" />
</div>
</form>
</body>
</html>

View 2 Replies

Change The View For Calendar Extender?

Mar 23, 2010

how can i set the 'Today button' control instead of 'Today:march,23,2010'(in bottom) for calender extender control

View 2 Replies

AJAX Calendar Extender Got Blurred?

Jun 26, 2010

i m facing a problem in calendar extendar.....i have used a calendar in the ajax accordian....when i click the heading of accordian, the calendar shows up...but after that wheni clickhe calendar image button , it displays the calendar but it is blurred.....that is the white background is some where elseand the dates some where else..the display of calendar is completely distributed..the other calendar extendar in the same project are working fine..

View 1 Replies

AJAX :: Calendar Extender Pops Up On Its Own?

Jan 12, 2010

I'm having problems with the calendar extendar on my textbox popping up when any event fires on the page.I didn't start having this issue until i implemented a second extend (MaskEdit) to my textbox, when i eliminated the (MaskedEdit) the issue still occured. '

<tr>
<td>
<asp:Label ID="startDateLab" runat="server">Start Date: </asp:Label>

[code]...

View 6 Replies

AJAX :: Calendar Extender Not Working With IE8?

Jun 10, 2010

I am using Calender Extender on one of my page and it is not working as expected on IE8. The problem i am facing is when i click on calender image calender shows for a fraction of second and goes away. It is really annoying and the same thing is working fine on Firefox and Chrome. Here is the code i am using .....

<asp:TextBox ID="txtPurchaseDate" runat="server" Width="80px"></asp:TextBox>

View 1 Replies

AJAX :: Set Calendar Extender Initial Value?

Nov 21, 2010

When I am in edit mode, how can I set the calendar that is displayed to the value that is in the Text box ?

How I did it below with SelectedDate="DatePaid" is not corect

VS2010 VB

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved