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

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>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.