|
|
|
|
@ -8,7 +8,8 @@ export class DateTimeInput extends UiElement {
|
|
|
|
|
private containerId: string,
|
|
|
|
|
private disabled: string,
|
|
|
|
|
private hidden: string,
|
|
|
|
|
private required: string) {
|
|
|
|
|
private required: string,
|
|
|
|
|
private language: string = 'en') {
|
|
|
|
|
super(elementId, containerId, '');
|
|
|
|
|
this.createElement(this.getTemplate());
|
|
|
|
|
|
|
|
|
|
@ -20,6 +21,8 @@ export class DateTimeInput extends UiElement {
|
|
|
|
|
}
|
|
|
|
|
public getTemplate() {
|
|
|
|
|
let requiredClass: string = "";
|
|
|
|
|
const doneText = this.language === 'en' ? 'Done' : 'تم';
|
|
|
|
|
const cancelText = this.language === 'en' ? 'Cancel' : 'إلغاء';
|
|
|
|
|
let disaledClass = "";
|
|
|
|
|
//let timeValue=null;
|
|
|
|
|
//let dateValue=null;
|
|
|
|
|
@ -45,7 +48,7 @@ export class DateTimeInput extends UiElement {
|
|
|
|
|
"<ion-item class='dynamicField'>" +
|
|
|
|
|
" <ion-label position='floating' style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
|
|
|
|
|
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
|
|
|
|
|
"<ion-datetime min='1900' max='2100' displayFormat='DD/MM/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + "></ion-datetime>" +
|
|
|
|
|
"<ion-datetime min='1900' max='2100' displayFormat='DD/MM/YYYY' value='" + this.value + "' done-text='" + doneText + "' cancel-text='" + cancelText + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + "></ion-datetime>" +
|
|
|
|
|
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+
|
|
|
|
|
// " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + dateValue+ "' "+this.disabled+" />"+
|
|
|
|
|
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "Time' value='" + timeValue + "' "+this.disabled+" />"+
|
|
|
|
|
|