How to format date of your jquery-ui calender plugin
Jquery plugin is more popular and most of the people like and they use the jquery ui calender plugin for the input box for date. but there are some problem which some people use date time such as yyyy-mm-dd, yyyy/mm/dd ,ect. so when user input date to the database there will be different and various type of date and It will be problem in some searching or using timestamp value and it will not also be a uniform date time. I will show some formatting for jquery ui calender plugin and it will be uniform for all date field and date input.
$( “#input_date” ).datepicker({ dateFormat: ‘yy-mm-dd’ } );
or
$( “#input_date” ).datepicker({ dateFormat: ‘yy/mm/dd’ } );
you can use the format as you want . I just only show how to format for the jquery ui calender plugin. Now you don’t need to worry about user input date format. they will add using the calendar and date format will also will be the same. you can also see how to add jquery ui calender. It is easy to setup and easy to use. Thanks for reading this post . if you have any comment or feedback, please leave it by comment.















