Hi Rajesh,
Use the below javascript to force user to select date from the Date Picker only.
/*JS For Validating Date Input*/
$(document).ready(function(){
$('.DateInputValid').on("cut copy paste",function(e) {
e.preventDefault();
});
});
$(document).on("cut copy paste",".DateInputValid",function(e) {
e.preventDefault();
});
function nokeypress(evt,InpId)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode !=13)
{
// $("#ValidationMessage_"+InpId.id).html("Please select date from calendar").show().fadeOut("slow");
return false;
}
return true;
}
After adding this javascript to module, call this function "return nokeypress(event,"+txtCreatedTo.Id+");"
on "onkeypress" event. Also apply the style class "DateInputValid" to prevent user from cut, copy, paste.