mirror of
https://github.com/HackPlan/angular-datepicker.git
synced 2026-01-12 22:44:06 +08:00
renamed calendar to datePicker (date-picker)
This commit is contained in:
@@ -24,23 +24,23 @@
|
||||
|
||||
<h3>views</h3>
|
||||
<h5>default</h5>
|
||||
<pre><div calendar="start"></div> </pre>
|
||||
<div calendar="start" class="datetimepicker"></div>
|
||||
<pre><div date-picker="start"></div> </pre>
|
||||
<div date-picker="start" class="datetimepicker"></div>
|
||||
<!--<h5>year</h5>-->
|
||||
<!--<pre><div calendar="start" <strong>year</strong>></div> </pre>-->
|
||||
<!--<div calendar="start" class="datetimepicker" year></div>-->
|
||||
<!--<pre><div date-picker="start" <strong>year</strong>></div> </pre>-->
|
||||
<!--<div date-picker="start" class="datetimepicker" year></div>-->
|
||||
<!--<h5>month</h5>-->
|
||||
<!--<pre><div calendar="start <strong>month</strong>></div> </pre>-->
|
||||
<!--<div calendar="start" class="datetimepicker" month></div>-->
|
||||
<!--<pre><div date-picker="start <strong>month</strong>></div> </pre>-->
|
||||
<!--<div date-picker="start" class="datetimepicker" month></div>-->
|
||||
<!--<h5>date</h5>-->
|
||||
<!--<pre><div calendar="start" <strong>date</strong>></div> </pre>-->
|
||||
<!--<div calendar="start" class="datetimepicker" date></div>-->
|
||||
<!--<pre><div date-picker="start" <strong>date</strong>></div> </pre>-->
|
||||
<!--<div date-picker="start" class="datetimepicker" date></div>-->
|
||||
<!--<h5>hours</h5>-->
|
||||
<!--<pre><div calendar="start" <strong>hours</strong>></div> </pre>-->
|
||||
<!--<div calendar="start" class="datetimepicker" hours></div>-->
|
||||
<!--<pre><div date-picker="start" <strong>hours</strong>></div> </pre>-->
|
||||
<!--<div date-picker="start" class="datetimepicker" hours></div>-->
|
||||
<!--<h5>minutes</h5>-->
|
||||
<!--<pre><div calendar="start" <strong>minutes</strong>></div> </pre>-->
|
||||
<!--<div calendar="start" class="datetimepicker" minutes></div>-->
|
||||
<!--<pre><div date-picker="start" <strong>minutes</strong>></div> </pre>-->
|
||||
<!--<div date-picker="start" class="datetimepicker" minutes></div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="span6">-->
|
||||
<!--<h3>Input</h3>-->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var Module = angular.module('dateInput', []);
|
||||
|
||||
|
||||
Module.directive('calendar', function () {
|
||||
Module.directive('datePicker', function () {
|
||||
var viewOptions = ['month', 'date', 'year', 'month', 'hours', 'minutes'];
|
||||
|
||||
function isValidDate(date) {
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
return {
|
||||
scope : {
|
||||
date : '=calendar',
|
||||
date : '=datePicker',
|
||||
after : '=?',
|
||||
before: '=?'
|
||||
},
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
element.bind('focus', function () {
|
||||
if (!picker) {
|
||||
picker = $compile('<div calendar="' + attrs.ngModel + '" class="datetimepicker datetimepicker-dropdown-bottom-left dropdown-menu" format="' + format + '" ' + views.join(' ') + '></div>')(scope);
|
||||
picker = $compile('<div date-picker="' + attrs.ngModel + '" class="datetimepicker datetimepicker-dropdown-bottom-left dropdown-menu" format="' + format + '" ' + views.join(' ') + '></div>')(scope);
|
||||
body.append(picker);
|
||||
picker.bind('mousedown', function () {
|
||||
return false;
|
||||
@@ -405,7 +405,7 @@
|
||||
|
||||
Module.directive('dateRange', function () {
|
||||
return {
|
||||
template: '<div class="dropdown-menu" style="display: block">\n <table >\n <tr>\n <td valign="top"><div calendar="start" class="datetimepicker" date after="start" before="end"></div></td>\n <td valign="top"><div calendar="end" class="datetimepicker" date after="start" before="end"></div></td>\n </tr>\n </table>\n \n \n</div>',
|
||||
template: '<div class="dropdown-menu" style="display: block">\n <table >\n <tr>\n <td valign="top"><div date-picker="start" class="datetimepicker" date after="start" before="end"></div></td>\n <td valign="top"><div date-picker="end" class="datetimepicker" date after="start" before="end"></div></td>\n </tr>\n </table>\n \n \n</div>',
|
||||
scope : {
|
||||
start: '=',
|
||||
end : '='
|
||||
|
||||
Reference in New Issue
Block a user