473,669 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

find if selected date already exists

1 New Member
i am new in jsf.in my project there is two rich calendar for select from date and select todate by users.if user going to select from date which date is already selected by user then how can i show error message that your selected date is already exist! thanks in advance
Apr 17 '13 #1
1 1393
r035198x
13,262 MVP
You can do this server side or client side. For client side add

Expand|Select|Wrap|Line Numbers
  1. ondateselected="validateDate();" oninputchange="validateDate();"
to your rich calendar tag. Then add the javascript

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function validateDate() {
  3.     var choosenDate = $("yourForm:yourCalendar").component.getCurrentDate();
  4. //do your client side validation logic here
  5.  
  6.  
  7. }
  8. </script>
For server side you register an f:validator for your calendar and implement the Validator interface to throw a ValidatorExcept ion when the date is not allowed.
Apr 17 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
13717
by: Chad Crowder | last post by:
Getting the following error on my production server whether the file exists or not: "System.IO.IOException: Cannot create a file when that file already exists." Here's the code generating the error (seems to be happening when I try creating a directory) If dirmgr.Exists("s:\blah\" & txt_name.Text) Then lblerror.Text = lblerror.Text & "Unable to build physical path. " &
0
1435
by: Michael England | last post by:
I'm having trouble with the Calendar control in ASP.NET using VB. When I place a calendar on a page and then select a new date, it seems that I have to select the date twice in order for any content on the page to be updated that depends on the selected date. The calendar itself updates correctly (the selected date is highlighted) but the other content on the page stays the same until the date is selected a second time. I'm not sure...
4
24439
by: Lisa Jones | last post by:
Hi Can someone tell me How do you get selected date form MonthCalendar control Thanks so muc Lisa
67
7683
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 4/30/06 I am looking for suggestions on how to find the date ranges where there were no transactions.
0
489
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX file has been used for code-signing before (to sign an InfoPath form), so therefore the file contains a valid code-signing key. I have the correct password to the PFX file (because I get a different error
0
1036
by: John Grandy | last post by:
For the standard ASP.NET Calendar control ( I'm not referring to the AJAX Control Toolkit ) : I am finding that the popup does not dismiss on click of an already-selected date. Are others also finding this ? Any workaround ?
1
1754
by: teddymeu | last post by:
Hi Guys Dont have much experience in writing my own JavaScripts and have a problem to overcome for work They need a date calculator which displays 90 days forward from a selected date, it will always be 90 days. Can anyone advise if there is a script out there that already does this and where to find it, or give me some help on coming up with something Kind Regards
5
3185
by: Dave | last post by:
I've suprisingly not been able to find examples on this. I'm creating a user account setup page, and the validators work fine on all the other fields. But now I'm creating a customvalidator (for the first time) and it is not doing anything. The page needs to see if a username already exists. Am I doing this right? <asp:textbox TabIndex="1" ID="tLogin" MaxLength="40" runat="server" /> <asp:customvalidator id="Customvalidator1"...
4
13067
gundarap
by: gundarap | last post by:
Hello all, I'm working on minidom. My goal is to see whether an element already exists in the xml file before adding. I was using getElementsByTagName() to check weather the element already exists. The code looks something like this: Value = argv a = dom.getElementsByTagName(Name).childNodes.nodeValue if (a!=Value): add elements. else: return
21
18587
Vkas
by: Vkas | last post by:
i had created my own web calender control!!!! it consist 1} text box (it display's the selected date) 2} button (it hide and show the calender control) 3} calender control (use for the selection of the date) How it works!!!! user clicks on the button calender control becomes visible user selects a date from calender control
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.