suresh anugandula
textfield should not allow the user to fill the date in it.
1 Answer(s)      4 years and a month ago
Posted in : HTML

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".

Advertisement
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
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
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
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>
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 on the Image
TextField on the Image  how we set label or textfield etc. on the Image
TextField
TextField      ... as the TextField. In the example given below, shown a textfield in the applet by creating its...;TextField("Type in the box");    add(tf); 
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
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
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
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
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
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
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
How to fill double array in java
How to fill double array in java  how to fill double array in java
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...;%=today_date%>  </td:welcome>  Nested tags: Refer
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
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   
textfield selected text
textfield selected text  How to select text in text field
Auto Fill Textbox - Java Beginners
Auto Fill Textbox   hi i am going to develope a php page with a select box and i want that this select box get auto fill when i write on it. please help me
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  can u tell me how to calculate difference between a user provided date and the system date in java