Fixed date format in edit post
This commit is contained in:
parent
b4fe18f5b5
commit
bc21934274
@ -73,7 +73,10 @@ var createPost = {
|
|||||||
onfocusout: m.withAttr('value', function(value) {
|
onfocusout: m.withAttr('value', function(value) {
|
||||||
post.current.valid_at = value
|
post.current.valid_at = value
|
||||||
}),
|
}),
|
||||||
value: post.current.valid_at
|
value: fecha.format(
|
||||||
|
post.current.valid_at ? new Date(post.current.valid_at)
|
||||||
|
: new Date(),
|
||||||
|
'YYYY/MM/DD')
|
||||||
}),
|
}),
|
||||||
m('br'),
|
m('br'),
|
||||||
m('label', {for: 'expired_at'}, 'Berlaku sampai: '),
|
m('label', {for: 'expired_at'}, 'Berlaku sampai: '),
|
||||||
@ -82,7 +85,10 @@ var createPost = {
|
|||||||
onfocusout: m.withAttr('value', function(value) {
|
onfocusout: m.withAttr('value', function(value) {
|
||||||
post.current.expired_at = value
|
post.current.expired_at = value
|
||||||
}),
|
}),
|
||||||
value: post.current.expired_at
|
value: fecha.format(
|
||||||
|
post.current.expired_at ? new Date(post.current.expired_at)
|
||||||
|
: new Date(),
|
||||||
|
'YYYY/MM/DD')
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
m('.full.two-third-600', [
|
m('.full.two-third-600', [
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user