Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
balbarak committed Mar 3, 2020
2 parents 4e29ec2 + a5663ec commit 8b6cfa2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 63 deletions.
2 changes: 1 addition & 1 deletion dist/js/bootstrap-hijri-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -13839,7 +13839,7 @@
///<summary>Destroys the widget and removes all attached event listeners</summary>
hide();
detachDatePickerElementEvents();
element.removeData('DateTimePicker');
element.removeData('HijriDatePicker');
element.removeData('date');
};

Expand Down
67 changes: 7 additions & 60 deletions samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,12 @@ <h2>Bootstrap Hijri Date Picker v1.0.0</h2>

<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<div class="form-group">
<label>
Date
</label>
<div class="input-group">
<input type="text" class="form-control default-input" />
</div>
</div>
<figure class="highlight">
<pre><code class="language-html" data-lang="html"><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"card"</span><span class="nt">&gt;</span>
<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"card-body"</span><span class="nt">&gt;</span>
This is some text within a card body.
<span class="nt">&lt;/div&gt;</span>
<span class="nt">&lt;/div&gt;</span></code></pre>
</figure>
</div>
</div>

</div>
<div class="col-md-6">
<div class="form-group">
<label>
Date
Default Hijir
</label>
<div class="input-group">
<input type="text" class="form-control hijri-date-input" />
</div>
<input id="hijri-picker" type="text" class="form-control" />
</div>
</div>
</div>
Expand All @@ -64,51 +41,21 @@ <h2>Bootstrap Hijri Date Picker v1.0.0</h2>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js"></script>
<script src="./js/bootstrap-hijri-datetimepickermin.js"></script>

<script type="text/javascript">


$(function () {

initDefault();

initHijrDatePicker();

//initHijrDatePickerDefault();

});

function initHijrDatePicker() {

$(".hijri-date-input").hijriDatePicker({
locale: "ar-sa",
format: "DD-MM-YYYY",
hijriFormat: "iYYYY-iMM-iDD",
dayViewHeaderFormat: "MMMM YYYY",
hijriDayViewHeaderFormat: "iMMMM iYYYY",
showSwitcher: true,
allowInputToggle: true,
showTodayButton: false,
useCurrent: true,
isRTL: true,
viewMode: 'months',
keepOpen: false,
hijri: true,
//debug: true,
showClear: true,
showTodayButton: true,
showClose: true
});
}

function initHijrDatePickerDefault() {

$(".hijri-date-input").hijriDatePicker();
}


function initDefault() {
$(".default-input").hijriDatePicker();
$("#hijri-picker").hijriDatePicker({
hijri:true,
showSwitcher:false
});
}

</script>
Expand Down
4 changes: 2 additions & 2 deletions src/js/bootstrap-hijri-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@
///<summary>Destroys the widget and removes all attached event listeners</summary>
hide();
detachDatePickerElementEvents();
element.removeData('DateTimePicker');
element.removeData('HijriDatePicker');
element.removeData('date');
};

Expand Down Expand Up @@ -2766,7 +2766,7 @@
maxDate: '2070-01-01',
extraFormats: false,
stepping: 1,
useCurrent: true,
useCurrent: false,
collapse: true,
locale: 'ar-SA',
defaultDate: false,
Expand Down

0 comments on commit 8b6cfa2

Please sign in to comment.