date picker issue in firebox and IE browser
Firebox and Internet Explorer do not support if the input type is date using HTML.
for that, we have to use input type as a TEXT and write some JQuery code to eliminate the date issue in both browsers.
for that, we have to use input type as a TEXT and write some JQuery code to eliminate the date issue in both browsers.
In HTML,
//Required script:
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
//HTML Changes:
<input type="text" id="dob" name="borDOb" class="form-control" />
//Jquery Changes:
<script>
$(document).ready(function(){
var $j = jQuery.noConflict();
$( "#dob" ).datepicker({ dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true,
yearRange: '1900:2050',
onSelect: function(date) {
angular.element($('#dob')).triggerHandler('change');
}
});
});
</script>