mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
indend corrections
This commit is contained in:
parent
3bf4f3ef40
commit
ef99e6a6b1
3 changed files with 11 additions and 11 deletions
|
|
@ -95,9 +95,9 @@ CardCustomField.register('cardCustomField');
|
||||||
}
|
}
|
||||||
|
|
||||||
showDate() {
|
showDate() {
|
||||||
// this will start working once mquandalle:moment
|
// this will start working once mquandalle:moment
|
||||||
// is updated to at least moment.js 2.10.5
|
// is updated to at least moment.js 2.10.5
|
||||||
// until then, the date is displayed in the "L" format
|
// until then, the date is displayed in the "L" format
|
||||||
return this.date.get().calendar(null, {
|
return this.date.get().calendar(null, {
|
||||||
sameElse: 'llll',
|
sameElse: 'llll',
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
|
||||||
types() {
|
types() {
|
||||||
const currentType = this.data().type;
|
const currentType = this.data().type;
|
||||||
return this._types.
|
return this._types.
|
||||||
map((type) => {return {
|
map((type) => {return {
|
||||||
value: type,
|
value: type,
|
||||||
name: TAPi18n.__(`custom-field-${type}`),
|
name: TAPi18n.__(`custom-field-${type}`),
|
||||||
selected: type === currentType,
|
selected: type === currentType,
|
||||||
};});
|
};});
|
||||||
},
|
},
|
||||||
|
|
||||||
isTypeNotSelected(type) {
|
isTypeNotSelected(type) {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ DatePicker = BlazeComponent.extendComponent({
|
||||||
events() {
|
events() {
|
||||||
return [{
|
return [{
|
||||||
'keyup .js-date-field'() {
|
'keyup .js-date-field'() {
|
||||||
// parse for localized date format in strict mode
|
// parse for localized date format in strict mode
|
||||||
const dateMoment = moment(this.find('#date').value, 'L', true);
|
const dateMoment = moment(this.find('#date').value, 'L', true);
|
||||||
if (dateMoment.isValid()) {
|
if (dateMoment.isValid()) {
|
||||||
this.error.set('');
|
this.error.set('');
|
||||||
|
|
@ -53,7 +53,7 @@ DatePicker = BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'keyup .js-time-field'() {
|
'keyup .js-time-field'() {
|
||||||
// parse for localized time format in strict mode
|
// parse for localized time format in strict mode
|
||||||
const dateMoment = moment(this.find('#time').value, 'LT', true);
|
const dateMoment = moment(this.find('#time').value, 'LT', true);
|
||||||
if (dateMoment.isValid()) {
|
if (dateMoment.isValid()) {
|
||||||
this.error.set('');
|
this.error.set('');
|
||||||
|
|
@ -62,7 +62,7 @@ DatePicker = BlazeComponent.extendComponent({
|
||||||
'submit .edit-date'(evt) {
|
'submit .edit-date'(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
// if no time was given, init with 12:00
|
// if no time was given, init with 12:00
|
||||||
const time = evt.target.time.value || moment(new Date().setHours(12, 0, 0)).format('LT');
|
const time = evt.target.time.value || moment(new Date().setHours(12, 0, 0)).format('LT');
|
||||||
|
|
||||||
const dateString = `${evt.target.date.value} ${time}`;
|
const dateString = `${evt.target.date.value} ${time}`;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue