Giter VIP home page Giter VIP logo

angular-material-datetimepicker's People

Contributors

2ernestkg avatar aroddy avatar contmp avatar darit avatar dhaval85 avatar drblue avatar hexadecy avatar indream avatar j-walker23 avatar jpike88 avatar logbon72 avatar lohithanand avatar nikoskalogridis avatar perdona avatar sovanna avatar t00rk avatar tezqa avatar therajumandapati avatar thewisenerd avatar vidanger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

angular-material-datetimepicker's Issues

Clock looks horrible! Everything is messed up!

I'm trying to use the date picker, I took the code from the examples and added it to my page:

<md-input-container class="col-md-2 col-md-offset-5" flex-gt-sm>
      <label>Time</label>
      <input mdc-datetime-picker="" date="false" time="true" type="text" id="time" short-time="true"
            placeholder="Time" min-date="minDate" format="hh:mm a" ng-model="time" class="md-input">
</md-input-container>

But the clock looks really bad and also the buttons are on the top!

capture2

Any idea about what could be the problem?

Inputs are not bluring after selection is made

The md-input-focused class is not being removed from the input-container after the selection is made, which is causing visual inconsistencies on the page after a change has been made to a date field.

Usability - Easy year selection

For things like date of birth, there needs to be an easier way to choose the year.

I have been trying to place an up/down arrow next to the year, and having it increment or decrement the date by one year when pressed.

The problem is that I'm trying to have that talk to the calendar display to trigger an update so it can re-center over the new date. Any suggestions?

Modifications made:

Modified the template variable:
+ ' <div class="dtp-actual-year">{{picker.currentDate.format("YYYY")}}</div>'
// new lines added below
+ ' <div ng-click="picker.incrementYear(1)">year up</div>'
+ ' <div ng-click="picker.incrementYear(-1)"class="dtp-actual-year">year down</div>'

Function added after the isPM function:

incrementYear: function (amount) {
this.selectDate(this.currentDate.add('year', amount));
}

When using in modal window has a delay

It seems kind off heavy to load when using on a modal dialog, takes like 2, 3 seconds to display the clock.

As note, I'm using it with another services and angular templating in the page, that might be slowing it down.

Is this working in md-dialog box?

Is this working in md-dialog box?
I want to used angular-material-datetimepicker in mg-dialog box.
But, mg-dialog box close when angular-material-datetimepicker time/date picker open.

there is any way to use angular-material-datetimepicker in mg-dialog box?

In using min-date and max-date attribute, while selecting date from other months from default selected date month, the calendar scrolls down to the bottom

If i used min-date and max-date attribute,

while selecting date from other months from default selected date month, the calendar scrolls down to the bottom.

This is because of wrong value of md-top-index in mdcDatetimePickerCalendar directive.

In the line 563 of our js file, we update calendar.topIndex from currentMonthIndex method alone.

var index = currentMonthIndex(nDate);
if (calendar.topIndex != index) {
calendar.topIndex = index;
}

Here we have to subtract calendar.months[0] from currentMonthIndex method to get exact index to set calendar.topIndex so that md-top-index.

So the correct code will be

var index = currentMonthIndex(nDate);
if (calendar.topIndex != index) {
calendar.topIndex = index - calendar.months[0];
}

Kindly fix this issue as soon as possible.
Thanks

Problem using "DD/MM/YYYY" format

When specifying "DD/MM/YYYY" as format, the datetimepickers date becomes invalid and shows an empty input.
The value I use as date = "2016-05-23T11:20:21.7329621+02:00"

My findings:
Setting the format at line 115: scope.currentDate = moment(scope.currentDate, scope.format); in angular-material-datetimepicker.js, the m.isValid() at line 125 returns false.

How to programmatically trigger the click

Great directive, Thanks for sharing it

how you will hack the directive to allow keyboard support, lets say if i press Alt-H , want to popup this awesome date time picker.

angular.element(elmName).triggerHandler('click');
angular.element(elmName).trigger('click');

none of them work

There is a conflict with Angular Material v1.1.1

Hello,

I'm trying to install it via Bower and I have an issue

ECONFLICT Unable to find suitable version for angular-material

I'm using Angular Material v1.1.1.

Could you please provide instructions how to resolve it?

Thanks,
Alexander

Usage of old version of moment.js

Hi Logbon,

This is a very nice and interactive module. But currently the one of it's dependency (Moment.js) is too old to be utilized. As moment.js updated some of their APIs.

Please update the package with suitable version.

DateTime popup not displaying properly (CSS Not loading)

I have tried to integrate your library into my app, but unfortunately the css is not loading properly. When the popup load the css is not being applied to it. I even made sure that the CSS for the popup was loading before bootstrap.
Should I also include other files such as: beautifier.js, and highlights and their appropriate CSS files? Because I did but still not getting what I expected.
mddatetimepopup

Clear Date

Hi,

How can I clear the date from the input field?

Thanks,
Hemant.

Type date instead of open a modal

Is there a way to choose type a date instead of automatically open a modal when the input get focused??? Like have a button side-by-side in a input, and the modal opens when the users click that button, but if the user prefer, he can type manually a date/time (like using a directive to mask or something like that)?

Support of Timestamp

Hello Guys,

Really good job.

However I want to know is there any way that the output is being set as Timestamp (long) and not as a Date object?

Thanks,
Dhaval

Cannot load module via npm

I would like to load this module via npm.
If I run npm i There is some progress showing up, but I cannot find the package in my node_modules directory.
There are no errors flashing up.

I added this to my package.json file:

{
  "dependencies": {
    "angular-material-datetimepicker": "git://github.com/logbon72/angular-material-datetimepicker#v1.3.1"
  }
}

I'm not sure what is causing this.
Might it be the ignored pattern "/.*" in the package.json?

How to config the background color

Hi logbon72, This module is very good, I like it. However I want to change the default background color to match my app theme. Can you show me how to do that? Thank you.

Datetime picker modal picks time in UTC

In the input box the date time is shown as 2016-06-12 14:10:00 but when I click on the input box to open the datetime picker modal, the time is shown in UTC (in my case UTC-5:30).
So it shows 08:40. How to fix this?

Suggestion: Use without a popup!

This would be fantastic if we could use it without the popup feature. For example, the Bootstrap UI datepicker will simply display the calendar as-is.

Has anyone suggested this or is there a PR in progress? Nice module

Outdated bower repository

$mdDialog option 'skipHide: true' is not setted in the Dialog config object. This option allows the datetime picker dialog open above another dialog.

Another interesting config is 'clickOutsideToClose: true', this option allows the dialog is closed when clicked outside or when escape key is pressed.

Month scrolling not working on touch screen

I had this working previously on my ionic application. I confirmed this is only on mobile by running ionic serve to run the application in my Mac's Chrome browser. See screenshots below.

Desktop
screen shot 2016-10-12 at 6 50 17 pm

Mobile Android device
screenshot_2016-10-12-18-50-37

Modal inside another modal

Greetings,

Is it possible to add this parameter "skipHide: true" in the $mdDialog.show call?

          $mdDialog.show({
              template: template,
              controller: PluginController,
              controllerAs: 'picker',
              locals: locals,
              openFrom: element,
              parent: angular.element(document.body),
              bindToController: true,
              disableParentScroll: false,
              skipHide: true
            })

This gonna make possible to show the DatePicker modal inside of another modal.

Regards,

Fabio

Error: [$compile:multidir] Multiple directives

Hi,

Thanks for this great lib!
This is my first time to use this lib and I'm encountering an error.
Here's the error on my browser's console: Error: [$compile:multidir] Multiple directives [input (module: app), mdcDatetimePicker] asking for new/isolated scope on: <input mdc-datetime-picker date="true" time="true" type="text" id="datetime" placeholder="Date" min-date="date" ng-model="dateTime" />

Hope you can help me with this.

Thanks.

Possibility of returning string to model

Not an issue but a suggestion

The date picker returns a date object or a moment object to the model and that makes it difficult to submit through a form as compared to when it is a string.

e.g. if the ng-model="response". $scope.response in the controller should be a string (not an object).

The moment or date object is technically not needed. You can use parseDate and formatDate to convert string to date and date to string when the datepicker is opened and a date is selected respectively.

Not compatible with Angular 1.6.x

How to set the minDate as a string?

I'm trying to set the minDate as a string in the HTML. I've tried:
min-date="2016-08-10"
But this doesn't work. Should it be a different format?

Closes already open popups when coming to for front of the screen

The datetime picker is being called from another modal popup and is forcing the original popup to close stopping me from returning to the original popup to continue what i was doing. Would it be possible to add a skipHide:true to the date time picker popup modal or some other method to stop the pop up from prematurely closing the parent modal popup?

npm package, ownership transfer

Hello,

I don't use bower and I needed to use this package under npm. There was no npm package, but I can see package.json file, so I created it here. I will happily transfer the ownership if you tell me your logins.

Thanks for the plugin!

moment is not defined

I followed the steps here: https://www.npmjs.com/package/bower-webpack-plugin
And I run
bower install angular-material-datetimepicker
Add
require("momentjs");
require("angular-material-datetimepicker");
in entry.js
run
webpack -d --watch
everything is fine. But when I open index.html in the browser, it said
Uncaught ReferenceError: moment is not defined
I try the bootstrap demo in the example. It's works fine. I don't know if I forgot anything else or if there is a bug in angular-material-datetimepicker?
Thanks for help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.