jalali Calendar for dateTimepicker jquery ui plugin
<p>I am using <a href="http://trentrichardson.com/examples/timepicker/" rel="nofollow">dateTimepicker</a> plugin for datepicker widget jquery ui.</p>

<p>Now I want to add jalali Calendar support to it. </p>

<p>Of course an alternate and customized version of datepicker jquery ui is written that you can see at <a href="http://hasheminezhad.com/datepicker" rel="nofollow">jalali date picker</a>.</p>

<p>that works very well but when I use <strong>datetimepicker</strong> and  <strong>jalali date picker</strong> ,a problem occurs.</p>

<p>If you know, in jalali calendar and gregorian calendar are some differences on day month length . for Example <strong>February</strong> month(2nd month in year) in Gregorian have 28 days while <strong>Ordibehesh</strong> (2nd month in jalali) have 31 days. </p>

<p>When attach both jalali datepicker and datetimepicker to page and call <strong>datetimepicker</strong> provided by dateTimepicker plugin, days shown are correct But when click(select) a date from (2nd month of jalali), for example Thirtieth day , 2nd day of third jalali month(named khordad) is returned, why ? because February has 28 month.</p>

<p>it is a jsfiddle Of that I described :</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function () {
   $(".datePicker").each(function () {
    $(this).datetimepicker({
     dateFormat: 'dd MM yy',
     altFieldTimeOnly: false,
     timeFormat: "HH:mm",
     altFormat: 'dd/mm/yy',
     separator: " ",
     altSeparator: " ",
     altField: $(this).next('.hiddenField'),
     stepMinute: 5
     
    });
   });

});</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://code.jquery.com/ui/1.12.0-rc.2/themes/smoothness/jquery-ui.css" rel="stylesheet"/&gt;
&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.1/jquery-ui-timepicker-addon.min.css" rel="stylesheet"/&gt;

&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="https://code.jquery.com/jquery-migrate-1.4.0.min.js"&gt;&lt;/script&gt;
&lt;script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"&gt;&lt;/script&gt;



&lt;script src="https://dl.dropboxusercontent.com/u/24987834/calendar.js"&gt;&lt;/script&gt;

&lt;script src="https://dl.dropboxusercontent.com/u/24987834/jquery.ui.datepicker-cc.js"&gt;&lt;/script&gt;

&lt;script src="https://dl.dropboxusercontent.com/u/24987834/jquery.ui.datepicker-cc-fa.js"&gt;&lt;/script&gt;

&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.1/jquery-ui-timepicker-addon.js"&gt;&lt;/script&gt;

&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.1/i18n/jquery-ui-timepicker-fa.js"&gt;&lt;/script&gt;



&lt;input id="start_date_picker" class="datePicker form-control from" targetTo="#end_date_picker" name="start_date_picker" type="text" style="direction:rtl"&gt;

&lt;input class="hiddenField" name="start_date" type="hidden"&gt;</code></pre>
</div>
</div>
</p>

<p>I think that click event attached to datetimepicker have a problem here.</p>