Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Added the getTime method#40

Open
JordyMoos wants to merge 2 commits intoweareoutman:gh-pagesfrom
JordyMoos:get-datetime
Open

Added the getTime method#40
JordyMoos wants to merge 2 commits intoweareoutman:gh-pagesfrom
JordyMoos:get-datetime

Conversation

@JordyMoos
Copy link
Copy Markdown

Added the getTime method which returns a Date object, the hours and minutes will be added to today.

// Get the time of single clockpicker
var dateObject = $('#demo-input').clockpicker('getTime');
console.log(dateObject);

// Get the time of a clockpicker list
$('.clockpicker').clockpicker('getTime', function(dateObject) {
    // The clockpicker element
    console.log(this);
    console.log(dateObject);
});

Also allows you to add a Date object as the 'default' options.
It will only use the Date object to get the time. It will not update the Date object when the time changes

$('#single-input').clockpicker({
    'default': new Date('Wed, 09 Aug 1995 13:15:00')
});

- Allow to add a Date as the 'default' options
@marcusklaas
Copy link
Copy Markdown

Lekker bezig Moosje!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the first + be there? What does it do?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casts it to a number

@piernik
Copy link
Copy Markdown

piernik commented Dec 12, 2014

It's good addition. Where Can I get version with it? It's no in official repo.

@JordyMoos
Copy link
Copy Markdown
Author

@piernik Thanks!

It is not in the official repo yet, @weareoutman needs to approve it first :)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12:00AM and 12:00PM both get converted to 12:00PM.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattkrick You are right fixed the issue in this commit
JordyMoos@6f0ac5f

@gicappa
Copy link
Copy Markdown

gicappa commented Feb 11, 2016

Is the project still supported? I'm asking because I think this pull is quite important and it's been opened in Dec 4, 2014 but I can't see any feedback from the maintainers about the possibility of a merge.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants