Fixed date format in edit post

This commit is contained in:
Gregorio Chiko Putra 2017-10-26 10:33:50 +07:00
parent b4fe18f5b5
commit bc21934274
3 changed files with 91 additions and 85 deletions

View File

@ -73,7 +73,10 @@ var createPost = {
onfocusout: m.withAttr('value', function(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('label', {for: 'expired_at'}, 'Berlaku sampai: '),
@ -82,7 +85,10 @@ var createPost = {
onfocusout: m.withAttr('value', function(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', [

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long