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

fix: #476 TimePicker is completely broken #486

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions sass/components/_timepicker.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Timepicker Containers */
.timepicker-modal {
max-width: 325px;
min-width: 300px;
max-height: none;
}

Expand All @@ -17,9 +18,8 @@

/* Clock Digital Display */
.timepicker-digital-display {
width: 200px;
flex: 1 auto;
background-color: var(--md-sys-color-primary);;
background-color: var(--md-sys-color-primary);
padding: 10px;
font-weight: 300;
}
Expand All @@ -33,12 +33,29 @@
position: relative;
user-select: none;

input[type=text]{
height: 4rem;
.timepicker-display-column {
display: flex;
justify-content: center;
color: rgba(255, 255, 255, 0.6);
border-bottom: 0px;
font-size: 4rem;
direction: ltr;

input[type=button] {
color: rgba(255, 255, 255, 0.6);
background-color: rgba(0, 0, 0, 0);
border-bottom: 0px;
font-size: 4rem;
direction: ltr;
text-align: center;
border: none;
outline: none;
}

input[type=button].text-primary {
color: rgba(255, 255, 255, 1);
}

input[type=button]:hover {
background-color: rgba(0, 0, 0, 0.08);
}
}
}

Expand All @@ -48,21 +65,6 @@
cursor: pointer;
}

input[type=text].timepicker-input-hours {
text-align: right;
width: 28%;
margin-right: 3px;
}

input[type=text].timepicker-input-minutes {
width: 33%;
margin-left: 3px;
}

input[type=text].text-primary {
color: rgba(255, 255, 255, 1);
}

.timepicker-display-am-pm {
font-size: 1.3rem;
position: absolute;
Expand Down
4 changes: 2 additions & 2 deletions src/timepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,9 @@ export class Timepicker extends Component<TimepickerOptions> {
<div class="timepicker-digital-display">
<div class="timepicker-text-container">
<div class="timepicker-display-column">
<input type="text" maxlength="2" autofocus class="timepicker-input-hours text-primary" />
<input type="button" maxlength="2" autofocus class="timepicker-input-hours text-primary" />
:
<input type="text" maxlength="2" class="timepicker-input-minutes" />
<input type="button" maxlength="2" class="timepicker-input-minutes" />
</div>
<div class="timepicker-display-column timepicker-display-am-pm">
<div class="timepicker-span-am-pm"></div>
Expand Down
Loading