-
Notifications
You must be signed in to change notification settings - Fork 177
i write this code for angular json schema form #227
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
Comments
Hi, |
yes,but i want to call my own method through submit button,but its not working.. |
i take one json for generate layout using typescript & angular 4,so if i create my own button for reset,submit,next & save,so need my own function for event,but in my json function is not work proprly...so give me solution.. |
i got the solution... |
but one more thing, |
if i take type="string" & layout type="date" its not working.. |
& i use angular material design for that.. |
What timezone are you using? it is related to #191 . In app.modules.ts : { provide: MAT_DATE_LOCALE, useValue: 'fr-FR' },
{ provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS},
{ provide: DateAdapter, useClass : MomentDateAdapter } and export class AppModule {
constructor(wl: WidgetLibraryService) {
wl.registerWidget('date', NewMaterialDatepickerComponent);
}
} Replace fr by your desired language |
Btw, using your own function on Submit is done in the template's json-schema-form tag : <json-schema-form framework="material-design" [layout]="layout" loadExternalAssets="false" [schema]="userScheme" [(ngModel)]="currentUser" (onSubmit)="submit($event)"></json-schema-form> Note the (onSubmit) binding. The event Object contains your validated and submitted form. |
i am not sure,so plz send me full code with output for datapicker.. |
and you can share related link for datepicker...for better understanding |
Hi, |
Thanks..Alex130 |
one more thing..Alex130 |
Hi, it's not implemented yet, you would need to write your own widget, you
can see the developer of the module writes about it in the future versions
section on the main github page.
If you do, please contribute to it if you can
|
ok..sure.. |
I did a pull request about this a while ago : #221 |
hi Alex130 |
{
"type" : "button",
"title" : "save",
onClick : "exampleOnSubmitFn($event)"
}
but does not work properly
The text was updated successfully, but these errors were encountered: