angular
angular

Reputation: 563

Disable Time in Angular Bootsrap DateTime Picker

I am creating Project using angularjs.I am using DatetimePicker in my project.The Link is

https://github.com/dalelotts/angular-bootstrap-datetimepicker

In One place I want to show only date not the time. But I dont know how can i disable the time.

Here is code:

$scope.config = {
  datetimePicker: {
    format: 'DD/MM/YYYY'
  }
};

In HTML

<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel" style="right: -15px; top: 4px;">
<datetimepicker data-ng-model="assCustmoers.date"
data-datetimepicker-config="{ dropdownSelector: '#dropdown1' }"></datetimepicker>
</ul>

Upvotes: 2

Views: 1720

Answers (2)

Karan
Karan

Reputation: 1108

Try this

 <datetimepicker data-ng-model="data.embeddedDate"
        data-datetimepicker-config="{ startView:'day', minView:'day' }" />

Upvotes: 1

seekers01
seekers01

Reputation: 560

You can format the input as follows: Add this module as a dependency to your application module:

var myAppModule = angular.module('MyApp', ['ui.dateTimeInput']);

and apply the directive to your form elements:

<datetimepicker data-date-time-input="DD/MM/YYYY" data-ng-model="assCustmoers.date" data-datetimepicker-config="{ dropdownSelector: '#dropdown1' }"></datetimepicker>

you can read more about it here.

Upvotes: 0

Related Questions