Skip to content

Commit

Permalink
Fixed Issue #27
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillardo committed Jul 7, 2015
1 parent e3ab34a commit c28c7fb
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 23 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-ui-datetime-picker",
"version": "1.1.1",
"version": "1.1.2",
"homepage": "https://github.com/Gillardo/bootstrap-ui-datetime-picker",
"authors": [
"Gillardo <[email protected]>"
Expand Down
9 changes: 1 addition & 8 deletions datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@
// default picker view
scope.showPicker = scope.enableDate ? 'date' : 'time';

// default text
scope.todayText = scope.todayText || 'Today';
scope.nowText = scope.nowText || 'Now';
scope.clearText = scope.clearText || 'Clear';
scope.closeText = scope.closeText || 'Close';
scope.dateText = scope.dateText || 'Date';
scope.timeText = scope.timeText || 'Time';

// get text
scope.getText = function (key) {
return scope[key + 'Text'] || uiDatetimePickerConfig[key + 'Text'];
};
Expand Down
11 changes: 2 additions & 9 deletions dist/datetime-picker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// https://github.com/Gillardo/bootstrap-ui-datetime-picker
// Version: 1.1.1
// Version: 1.1.2
// Released: 2015-07-07
angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.position'])
.constant('uiDatetimePickerConfig', {
Expand Down Expand Up @@ -47,14 +47,7 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
// default picker view
scope.showPicker = scope.enableDate ? 'date' : 'time';

// default text
scope.todayText = scope.todayText || 'Today';
scope.nowText = scope.nowText || 'Now';
scope.clearText = scope.clearText || 'Clear';
scope.closeText = scope.closeText || 'Close';
scope.dateText = scope.dateText || 'Date';
scope.timeText = scope.timeText || 'Time';

// get text
scope.getText = function (key) {
return scope[key + 'Text'] || uiDatetimePickerConfig[key + 'Text'];
};
Expand Down
4 changes: 2 additions & 2 deletions dist/datetime-picker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ <h3>Pick a date</h3>
<li>dateDisabled used, todays date is disabled when the picker is displaying days</li>
<li>closeOnDateSelection="false"</li>
<li>datepickerOptions - showWeeks=false, startingDay=1</li>
<li>clear-text - is set to 'Remove' instead of using the default 'Clear'</li>
</ul>
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">Date</label>
<div class="col-sm-10">
<p class="input-group">
<input type="text" class="form-control" datetime-picker="dd MMM yyyy" ng-model="dates.date1" is-open="open.date1" enable-time="false" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" close-on-date-selection="false" />
<input type="text" class="form-control" datetime-picker="dd MMM yyyy" ng-model="dates.date1" is-open="open.date1" enable-time="false" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" close-on-date-selection="false" datepicker-append-to-body="true" clear-text="Remove" />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="openCalendar($event, 'date1')"><i class="fa fa-calendar"></i></button>
</span>
Expand Down Expand Up @@ -117,6 +118,27 @@ <h3>Pick two dates to calculate difference</h3>
</div>
</div>
</form>
<h3>Global Configured DateTime Picker</h3>
<p>Date picker only passes in the model and isOpen parameters, the rest are determined by the constant uiDatetimePickerConfig</p>
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">Both</label>
<div class="col-sm-10">
<p class="input-group">
<input type="text" class="form-control" datetime-picker ng-model="dates.date6" is-open="open.date6" />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="openCalendar($event, 'date6')"><i class="fa fa-calendar"></i></button>
</span>
</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">model</label>
<div class="col-sm-10">
<p class="form-control-static">{{ dates.date6 }}</p>
</div>
</div>
</form>
</div>
</body>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-ui-datetime-picker",
"url": "https://github.com/Gillardo/bootstrap-ui-datetime-picker",
"version": "1.1.1",
"version": "1.1.2",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-angular-templates": "^0.5.7",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ There is also a custom class called datetime-picker-dropdown that is inserted in
}

.datetime-picker-dropdown > li.date-picker-menu div > table .btn-default {

}

.datetime-picker-dropdown > li.time-picker-menu div > table {
Expand Down

0 comments on commit c28c7fb

Please sign in to comment.