show the date in textbox when we select item (items like--
today,yesterday,lastweek,lastmonth,lastyear) from
dropdownlist using javascript?
Answer / syed ahmed jawwad
<!--- Include Jquery Script, source www.jquery.com--->
<select id="dayType" name="dayType" onchange="showFields()">
<option>Today</option>
<option>Yesterday</option>
<option>Last Week</option>
<option>Last Month</option>
<option>Voucher Number</option>
</select>
<input type="text" id="dateValue" name="dateValue">
<script type="text/javascript">
function showFields()
{
if(jQuery('#dayType').val()=='Today' ||
jQuery('#dayType').val()=='Yesterday')
{
jQuery('#dateValue').datepicker({changemonth:
true, changeyear: true, dateformat:'mm/dd/yy'});
}else jQuery('#dateValue').datepicker('destroy');
}
</script>
Is This Answer Correct ? | 3 Yes | 0 No |
What is the difference between null and undefined?
Can you assign an anonymous function to a variable?
How to convert a string to a number using javascript?
if the two text boxes are there i want assign the vales like 2&3 and if i select button means i want find the sum.this is client side scripting in javascript
What is the difference between let and var?
What are the main uses of javascript?
What is enum in javascript?
How many types of data types are there?
What is the difference between undefined value and null value?
How to prevent a window not to be clicked or selected any way in java script?
I am providing the Online& class room training on Worksoft Certify for SAP/HTML/JAVA using real time scenarios in a real time environment for a real time project, If any one is interested please get in touch with me on aimansaud@gmail.com
WHAT IS .NET?