Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Time display error in Time picker #250

Closed
jayathuam opened this issue Jun 26, 2017 · 2 comments
Closed

Time display error in Time picker #250

jayathuam opened this issue Jun 26, 2017 · 2 comments
Labels

Comments

@jayathuam
Copy link

jayathuam commented Jun 26, 2017

Bug, feature request, or proposal:

Time displaying error in time picker.
capture

What is the expected behavior?

Time should be displayed.

What is the current behavior?

Displaying time is not in the correct format.

Which versions of Angular, MD2, OS, browsers are affected?

MD2 version 0.0.25, Angular 4

Is there anything else we should know?

24 hours clock is also not working.

@jayathuam jayathuam changed the title Hello, Time display error in Time picker Jun 26, 2017
@dharmeshpipariya-zz dharmeshpipariya-zz self-assigned this Jun 27, 2017
@ph55
Copy link

ph55 commented Jun 29, 2017

@dharmeshpipariya when it will be released ? Trying to work with master - but there is an compiling errors.

@mhecktor
Copy link

mhecktor commented Sep 11, 2017

I found a workaround that worked for me:
1.Inject the DateLocale Service
2.Set hour labels (0-24)
this.dateLocale.hours = this.range(24, i => String(i));

private range<T>(length: number, valueFunction: (index: number) => T): T[] {
		const valuesArray = Array(length);
		for (let i = 0; i < length; i++) {
			valuesArray[i] = valueFunction(i);
		}
		return valuesArray;
	}

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

No branches or pull requests

4 participants