textfield should not allow the user to fill the date in it.

textfield should not allow the user to fill the date in it.

I got a requirement like this,

I am dislaying a text field along with a calendar. Here user should not fill the date inside the text field manually. If he tries to fill the date manually, i have to display some message like "please click on calendar object".

View Answers

May 19, 2011 at 1:28 PM

Try this:

<html>
<script>
function getValue(){
var v=window.prompt("Enter your name: ");
document.getElementById("cal").value=v;
}
function valid(){
alert('Click the button');
document.getElementById("cal").value="";
}
</script>
<input type="text" id="cal" onkeydown="valid();"><input type="button" value="popup" onclick="getValue();">
</html>









Related Tutorials/Questions & Answers:
textfield should not allow the user to fill the date in it.
textfield should not allow the user to fill the date in it.  I got.... Here user should not fill the date inside the text field manually. If he tries to fill the date manually, i have to display some message like "please click
Restricting the user from filling the data in a textfield using html
Restricting the user from filling the data in a textfield using html  I got a requirement like this, If the user is trying to fill a text field, i have to restrict him
Advertisements
user defined date class
user defined date class  Develop a user defined date class with public.Fill the members using existing class method.implement the methods for finding current date(),days between method,advanced days and after days
user defined date class
user defined date class  Develop a user defined date class with public.Fill the members using existing class method.implement the methods for finding current date(),days between method,advanced days and after days
default password Allow the user to see the typed alphanumeric or character before it is changed to an encrypted dot
default password Allow the user to see the typed alphanumeric or character before it is changed to an encrypted dot  Allow the user to see the typed alphanumeric or character before it is changed to an encrypted dot in xsl n
how to prevent user selecting past date from calender
how to prevent user selecting past date from calender  how to prevent user selecting past date from calender ex: today's date is 21st march user should not select 20th march or below
Allow to Enter only numeric data.
Allow to Enter only numeric data.  hi....... I want to ask that in my project i have a textfield where user is going to enter the data so i want that the user should allow to enter only numeric data. I mean to say that if user
should close the browser with user confirmation in javascript - Java Beginners
should close the browser with user confirmation in javascript  Hi, I need to close the browser with the user confirmation. If the user accept olny he/she can close the browser otherwise can't close the browser. How can I do
Display PHP clock with user input date and time
Display PHP clock with user input date and time  The following PHP code displays a clock with current date and time. I want the clock to receive user input date and time. How can this be done? <?php date<em>
TextField on the Image
TextField on the Image  how we set label or textfield etc. on the Image
Fill in the blanks.
Fill in the blanks.   Fill in the blanks. 1 ___operator is used to crate an array. 2 ___method can be called without the instance of a class. 3 When an interface method is implemented in a class. it must be declared
TextField
TextField      ... as the TextField. In the example given below, shown a textfield in the applet by creating its...;new TextField("Type in the box");    
TextField validations
TextField validations  I want to know How to check first letter capital or not in a text field and also check all are characters or not in same textfield? and also want to know how to check all digits or not in a textfield? ex
TextField validations
TextField validations  I want to know How to check first letter... textfield? and also want to know how to check all digits or not in a textfield? ex... character should start with capital letter!","Error!", JOptionPane.ERROR_MESSAGE
how to allow table editing
how to allow table editing   1**. hi... l've tried the method isCellEditable(int rowIndex, int colIndex) { return true but it doesn't enabled the user the editing of any cell why????????????? regards
date
date  can u tell me how to calculate difference between a user provided date and the system date in java
date
date  can u tell me how to calculate difference between a user provided date and the system date in java
Java textfield validaton
Java textfield validaton  Sir... i'm new to java. In java JTextfield when we entered a negative value after pressing one button it have to display an error message dialog of textfield and also the textfield should accept
Java textfield validaton
Java textfield validaton  Sir... i'm new to java. In java JTextfield when we entered a negative value after pressing one button it have to display an error message dialog of textfield and also the textfield should accept
Non-edit Combobox with auto fill - Swing AWT
-editable mode of JCombobox, For ex: If user type "Ch" JCombobox should select "Charls", If user type "Chi", JCombobox should select "Chim". I tried to catch... characters typed by the user for auto fill for JCombobox in non-editable mode
Simple Java applet that need usernam, password and textfield.
that require user to login by username and password. After login, they should meet a textfield box. Anything that been input to that textbox will be transfer to DB2...Simple Java applet that need usernam, password and textfield.  Hi
need solution to get file name from path which should give by user
need solution to get file name from path which should give by user  how do i write a program in java that i should get file path from arguments.currently this code creates the file at d:\ but i need to get this file name
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.
I have a tex box. in that i want user should enter data in the format specified(for eg--a_b_c_d_e_)how to write code for it.  I have a tex box. in that i want user should enter data in the format specified(for eg--abcde_)how
Display Current Date using JSP Custom(user define) Tag
Display Current Date using JSP Custom(user define) Tag In this section, we will discuss about how to display current date & time using  custom(user...;<td: welcome>  <%=today_date%>  </td:welcome>ADS
elasticsearch allow from all
elasticsearch allow from all  Hi, I am in development environment and want to allow the access of ealsticsearch from all the hosts. Program should access elasticsearch allow from all hosts. How to configure elasticsearch
elasticsearch allow from all
elasticsearch allow from all  Hi, I am in development environment and want to allow the access of ealsticsearch from all the hosts. Program should access elasticsearch allow from all hosts. How to configure elasticsearch
ModuleNotFoundError: No module named 'allow'
ModuleNotFoundError: No module named 'allow'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'allow' How to remove the ModuleNotFoundError: No module named 'allow'
ModuleNotFoundError: No module named 'allow'
ModuleNotFoundError: No module named 'allow'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'allow' How to remove the ModuleNotFoundError: No module named 'allow'
textfield selected text
textfield selected text  How to select text in text field
Disabling User Edits in a JTable Component
to disable the user edits in a JTable component means editing is not allow to user. User can't edit any cell of JTable according  to his/her own requirements... Disabling User Edits in a JTable Component   
date
date   how to insert date in database? i need coding
s:textfield - Struts
s:textfield  I am using the s:textfield tag in an appication and need... this?  Hi friend, Textfield Tag Example Textfield Tag Example
date
date  i want difference between the date entered in a jtextfield and the system date in java
User Define Alert Example
User Define Alert Example       Creating a user defined alert message, In the given example we have created a image that can be fill with some colors and text
How to fill double array in java
How to fill double array in java  how to fill double array in java
Date limit on Dojo Date picker - Date Calendar
to 30/04/2009, then user should not select date beyond this limit. I can do... want this validation on dojo date picker only. User should not select date... picker in my project. When user click on date text box, date picker will pop up
Date Class In Action Script
.style1 { font-size: medium; } Date Class in Action Script 3:- If user... class that provide date and time related information. User access the current.... In this example user can see how to create a Date class object in the application
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
date
date  how to insert date using html through the combobox
fill combobox at runtime jsp
fill combobox at runtime jsp  i have 1 combobox in jsp which is filled with value from sql db on load of form <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection cn
random color fill
random color fill   Hi I am trying to create a randomly color filled oval but the outcome is a black filled oval this is the code: package assignment2; import java.awt.Color; import java.awt.Graphics; import java.util.Random
ModuleNotFoundError: No module named 'red-fill'
ModuleNotFoundError: No module named 'red-fill'  Hi, My Python...-fill' How to remove the ModuleNotFoundError: No module named 'red-fill... to install padas library. You can install red-fill python with following
ModuleNotFoundError: No module named 'fill-missing-101703384'
ModuleNotFoundError: No module named 'fill-missing-101703384'  Hi...: No module named 'fill-missing-101703384' How to remove the ModuleNotFoundError: No module named 'fill-missing-101703384' error? Thanks   Hi
ModuleNotFoundError: No module named 'fill-voids'
ModuleNotFoundError: No module named 'fill-voids'  Hi, My Python... 'fill-voids' How to remove the ModuleNotFoundError: No module named 'fill... have to install padas library. You can install fill-voids python
date
database table name birthday (DOB date); dob with DATE data type in database while...=d.getTime(); java.sql.Date date = new java.sql.Date(t); try { System.out.println(date); Class.forName("oracle.jdbc.OracleDriver"); con
IPhone-UIPicker Data to TextField
IPhone-UIPicker Data to TextField  When I select the textfield, a picker view must come in form of action sheet and the data selected from that picker view must be populated in the text field. can anyone help me on this please
DATE
DATE  I have the following as my known parameter Effective Date... of calcultion starts My question is how to find the date of Thursday This cycle... the date of all the thursdays of the given year. import java.util.*; import
how to set the value of textfield constant
how to set the value of textfield constant  how to set the value of textfield constant

Ads