mirror of https://github.com/Squidex/squidex.git
Browse Source
* Code for UTC implementation * Modified text on 'Today' button as it 'Date-Only' fields have this button and Date-Only buttons only work with UTC Ensure that Date Only field only works in UTC and no conversion is made * fixed code error for UTC conversion of just date-only fields * Displaying date-times on frontend as Local * Removed UTC text from translation JSON files * Code review comment changes * Simplified logic for 'Now' button when using the two toggles for time mode * code review changes (pairing with Sebastian) Co-authored-by: segalj <jason.segal@reedbusiness.com>pull/564/head
committed by
GitHub
11 changed files with 105 additions and 47 deletions
@ -1,25 +1,37 @@ |
|||
<div> |
|||
<div (sqxResizeCondition)="setCompact($event)" [sqxResizeMinWidth]="500" [sqxResizeMaxWidth]="0"> |
|||
<div class="form-inline"> |
|||
<div class="form-group mr-1"> |
|||
<div *ngIf="!isCompact && isDateTimeMode && shouldShowDateTimeModeButton"> |
|||
<button type="button" class="btn btn-text-secondary btn-sm btn-time-mode" (click)="setLocalMode(false)" |
|||
*ngIf="isLocalMode"> |
|||
Local |
|||
</button> |
|||
<button type="button" class="btn btn-text-secondary btn-sm btn-time-mode" (click)="setLocalMode(true)" |
|||
*ngIf="!isLocalMode"> |
|||
UTC |
|||
</button> |
|||
</div> |
|||
<div class="input-group"> |
|||
<input type="text" class="form-control form-date" [formControl]="dateControl" placeholder="{{ 'common.date' | sqxTranslate }}" [class.form-date-only]="!showTime" (blur)="callTouched()" maxlength="10" #dateInput> |
|||
<input type="text" class="form-control form-date" [formControl]="dateControl" placeholder="{{ 'common.date' | sqxTranslate }}" [class.form-date-only]="!isDateTimeMode" [class.form-date-time-only]="isDateTimeMode && shouldShowDateTimeModeButton" |
|||
(blur)="callTouched()" maxlength="10" #dateInput> |
|||
|
|||
<input type="text" class="form-control form-time" [formControl]="timeControl" placeholder="{{ 'common.time' | sqxTranslate }}" (blur)="callTouched()" *ngIf="showTime"> |
|||
<input type="text" class="form-control form-time" [formControl]="timeControl" placeholder="{{ 'common.time' | sqxTranslate }}" (blur)="callTouched()" *ngIf="isDateTimeMode"> |
|||
</div> |
|||
|
|||
<button type="button" class="btn btn-text-secondary btn-sm btn-clear" [class.hidden]="!hasValue" [disabled]="snapshot.isDisabled" (click)="reset()" *ngIf="!hideClear"> |
|||
<button type="button" class="btn btn-text-secondary btn-sm btn-clear" [class.hidden]="!hasValue" |
|||
[disabled]="snapshot.isDisabled" (click)="reset()" *ngIf="!hideClear"> |
|||
<i class="icon-close"></i> |
|||
</button> |
|||
</div> |
|||
<div class="form-group" *ngIf="showTime && shouldShowDateButtons"> |
|||
<div class="form-group" *ngIf="isDateTimeMode && shouldShowDateButtons"> |
|||
<button type="button" class="btn btn-text-secondary" [disabled]="snapshot.isDisabled" (click)="writeNow()" title="i18n:common.dateTimeEditor.nowTooltip"> |
|||
{{ 'common.dateTimeEditor.now' | sqxTranslate }} |
|||
</button> |
|||
</div> |
|||
<div class="form-group" *ngIf="!showTime && shouldShowDateButtons"> |
|||
<div class="form-group" *ngIf="!isDateTimeMode && shouldShowDateButtons"> |
|||
<button type="button" class="btn btn-text-secondary" [disabled]="snapshot.isDisabled" (click)="writeNow()" title="i18n:common.dateTimeEditor.todayTooltip"> |
|||
{{ 'common.dateTimeEditor.today' | sqxTranslate }} |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
Loading…
Reference in new issue