Javascript code convert Western calendar to Japanese calendar
It’s easy to convert western calendar to Japanese calendar with a few lines of Javascript (西 暦 を 日本 暦 に 変 換 す る), to combine the datepicker to display the Japanese language, to display the Japanese era, there are few articles to share. In this article, I will share the javascript code to perform as shown below, assuming the code is in php language, similar to other languages. 1. Html: Show input text to choose date in file index.php <input class=”form-control date” type=”text” value=”<?php echo date(‘Y-m-d’); ?>” autocomplete=”off”> <span class=”show_date”></span> 2. Css: You can edit the calendar color at here. <style type=”text/css”> .ui-datepicker-calendar thead { background: #cee4f7; } .ui-datepicker-week-end, .ui-datepicker-week-end a{ background: #facbcb !important; } .ui-datepicker-calendar .ui-datepicker-week-end .ui-state-active{ background: #007fff !important; color: #fff } </style> 3. Script library: Jquery,...