Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set time to current time at popup time picker #53

Closed
aishahismail opened this issue Oct 6, 2015 · 2 comments
Closed

Set time to current time at popup time picker #53

aishahismail opened this issue Oct 6, 2015 · 2 comments

Comments

@aishahismail
Copy link

Right now, when I click the button to change the time, the popup showed the current hour, let's say right now is 03:30 PM, but the popup showed only 03:00 PM. So where can I adjust the default time? I had changed it before at .directive, but it still got the same output. Thanks for help.

@aishahismail aishahismail changed the title Set time to current time at picker time Set time to current time at popup picker time Oct 6, 2015
@aishahismail aishahismail changed the title Set time to current time at popup picker time Set time to current time at popup time picker Oct 6, 2015
@Flati Flati mentioned this issue Oct 7, 2015
@rajeshwarpatlolla
Copy link
Owner

Yes, it takes the current hour. It won't pick the in between minutes like 3:15 or 3:30 etc. It takes 3:00 or 4:00 etc.

But as per your suggestion i have added that feature, so that it will pick the current time. Let's say if the current time is 13:14, then it will use the same time when you click on the button.

Also you can pass the time as shown below, so that it will pick the current hours and minutes. If ignore this inputEpochTime property then i t will pick the current hours and minutes, but it won't be shown on the button, until you select some time.

$scope.timePickerObject12Hour = {
      inputEpochTime: ((new Date()).getHours() * 60 * 60) + ((new Date()).getMinutes() * 60),  //Optional
      ....
};

Please take a look at this commit

@aishahismail
Copy link
Author

it works! thanks for help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants