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.





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>


Popular posts from this blog

How to extract information from xml using node.js

How to clone a record using custom button in salesforce

Child to parent component communication in lwc