Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i set date format? #146

Open
sanatani9 opened this issue Sep 24, 2018 · 4 comments
Open

how can i set date format? #146

sanatani9 opened this issue Sep 24, 2018 · 4 comments

Comments

@sanatani9
Copy link

sanatani9 commented Sep 24, 2018

I have multiple inline editor on page. but i have issue with date type.
when i set date format as 'y-m-d' then date value is pre-selected in inline editor, but 'm-d-y ' date format is then value is not selected, and it show "dd-mm-yyyy".

now i want my date format as 'm-d-y' so how can i set date format?
can you help me?

i am attaching this SS pleas have a look.

https://www.screencast.com/t/umh3RR1koL4

@sanatani9
Copy link
Author

@xxxTonixxx can you help?

@tonivj5
Copy link
Collaborator

tonivj5 commented Oct 8, 2018

Hi @archish1989, that feature isn't implemented.

And we're working in release the 1.0.0. We add this feature to release with it 👍

@sanatani9
Copy link
Author

FYI i was in hurry so I've solve my issue like this.

template file:

<inline-editor (onCancel)="editCancle()" (onEdit)="savePrevValue($event,'paymentrecived')" empty="Enter Payment Received Date" type="date" class="clsProject" [(ngModel)]="paymentrecived" (onSave)="saveEditable($event,'paymentrecived','date')" name="paymentrecived" ></inline-editor>

ts file


let invDat = new Date(projectForm.projects.paymentrecived);
paymentrecived = dp.transform(invDat, 'MM-dd-yyyy');                        
setTimeout(function(){ 
     $( "input[ng-reflect-name='paymentrecived']" ).val(dp.transform(invDat, 'yyyy-MM-dd'));
}, 1000);

setTimeout(function(){
$( "input[ng-reflect-name='paymentrecived']" ).val(dp.transform(invDat, 'yyyy-MM-dd'));
}, 1000);

This code done magic for me.

@tonivj5
Copy link
Collaborator

tonivj5 commented Oct 13, 2018

Thanks for share your workaround while this feature is missing ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants