diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/app.component.ts b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/app.component.ts new file mode 100644 index 000000000..e69de29bb diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/app.module.ts b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/app.module.ts new file mode 100644 index 000000000..82a7331fd --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/app.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { DatePickerModule } from '@syncfusion/ej2-ng-calendars'; +import { AppComponent } from './app.component'; + + +/** + * Module + */ +@NgModule({ + imports: [ + BrowserModule, + DatePickerModule + ], + declarations: [AppComponent], + bootstrap: [AppComponent] +}) +export class AppModule { } \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/main.ts b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/main.ts new file mode 100644 index 000000000..7222475b3 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/app/main.ts @@ -0,0 +1,6 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { enableProdMode } from '@angular/core'; +import { AppModule } from './app.module'; + +enableProdMode(); +platformBrowserDynamic().bootstrapModule(AppModule); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.css b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.css new file mode 100644 index 000000000..034881ee4 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.css @@ -0,0 +1,23 @@ +#container { + visibility: hidden; +} + +#loader { + color: #008cff; + height: 40px; + width: 30%; + position: absolute; + top: 45%; + left: 45%; +} + +#element { + display: block; + height: 350px; +} + +#wrapper { + width: 250px; + margin: 0 auto; +} + diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.js b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.js new file mode 100644 index 000000000..9bfc395d2 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.js @@ -0,0 +1,9 @@ + var datepicker = new ej.calendars.DatePicker({ + placeholder: 'Choose a date', + value: new Date(), + // sets the format. + format: 'yyyy-MM-dd', + inputFormats: ['dd/MM/yyyy', 'yyyyMMdd'] + }); + datepicker.appendTo('#element'); + diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.ts b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.ts new file mode 100644 index 000000000..49c3953c8 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/index.ts @@ -0,0 +1,13 @@ + + +import { DatePicker } from '@syncfusion/ej2-calendars'; +// creates a DatePicker component with custom format. +let datepickerObject: DatePicker = new DatePicker({ + value: new Date(), + // sets the format. + format: 'yyyy-MM-dd', + inputFormats: ['dd/MM/yyyy', 'yyyyMMdd'] +}); +datepickerObject.appendTo('#element'); + + diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/js/index.html b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/js/index.html new file mode 100644 index 000000000..c778e219e --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/js/index.html @@ -0,0 +1,32 @@ + + Essential JS 2 DatePicker control + + + + + + + + + + + + + + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/styles.css b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/styles.css new file mode 100644 index 000000000..eca48f864 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/styles.css @@ -0,0 +1,18 @@ +#container { + visibility: hidden; + max-width: 250px; + margin: 0 auto; +} + +#loader { + color: #008cff; + height: 40px; + width: 30%; + position: absolute; + top: 45%; + left: 45%; +} + +#element { + display: block; +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/systemjs.config.js b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/systemjs.config.js new file mode 100644 index 000000000..c36baf442 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/systemjs.config.js @@ -0,0 +1,32 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js" + } +}); + +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datepicker/getting-started-cs15/ts/index.html b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/ts/index.html new file mode 100644 index 000000000..9b65f0523 --- /dev/null +++ b/ej2-javascript/code-snippet/datepicker/getting-started-cs15/ts/index.html @@ -0,0 +1,27 @@ + + + + + Essential JS 2 DatePicker control + + + + + + + + + + + + + + + +
LOADING....
+
+ +
+ + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.js b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.js new file mode 100644 index 000000000..ef6144858 --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.js @@ -0,0 +1,10 @@ + var datetimepicker = new ej.calendars.DateTimePicker({ + placeholder: 'Choose a date', + value: new Date(), + // sets the format. + format: 'yyyy-MM-dd hh:mm', + // sets the input format. + inputFormats: ['dd/MM/yyyy hh:mm a', 'yyyyMMdd HH:mm'] + }); + datetimepicker.appendTo('#element'); + diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.ts b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.ts new file mode 100644 index 000000000..1c55785cd --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/index.ts @@ -0,0 +1,14 @@ + + +import { DateTimePicker } from '@syncfusion/ej2-calendars'; +// creates a DatePicker component with custom format. +let datetimepickerObject: DateTimePicker = new DateTimePicker({ + value: new Date(), + // sets the format. + format: 'yyyy-MM-dd hh:mm', + // sets the input format. + inputFormats: ['dd/MM/yyyy hh:mm a', 'yyyyMMdd HH:mm'] +}); +datetimepickerObject.appendTo('#element'); + + diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/js/index.html b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/js/index.html new file mode 100644 index 000000000..54d7b1e5e --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/js/index.html @@ -0,0 +1,34 @@ + + Essential JS 2 DateTimePicker control + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/styles.css b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/styles.css new file mode 100644 index 000000000..eca48f864 --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/styles.css @@ -0,0 +1,18 @@ +#container { + visibility: hidden; + max-width: 250px; + margin: 0 auto; +} + +#loader { + color: #008cff; + height: 40px; + width: 30%; + position: absolute; + top: 45%; + left: 45%; +} + +#element { + display: block; +} \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/systemjs.config.js b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/systemjs.config.js new file mode 100644 index 000000000..c36baf442 --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/systemjs.config.js @@ -0,0 +1,32 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js" + } +}); + +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/ts/index.html b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/ts/index.html new file mode 100644 index 000000000..9f52e3311 --- /dev/null +++ b/ej2-javascript/code-snippet/datetimepicker/getting-started-cs13/ts/index.html @@ -0,0 +1,29 @@ + + + + + Essential JS 2 DateTimePicker control + + + + + + + + + + + + + + + + + +
LOADING....
+
+ +
+ + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/index.js b/ej2-javascript/code-snippet/mention/getting-started-cs13/index.js new file mode 100644 index 000000000..57c819c26 --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/index.js @@ -0,0 +1,10 @@ +var userData = ['Selma Rose', 'Garth', 'Robert', 'William', 'Joseph']; +// initialize Mention component +var mentionObj = new ej.dropdowns.Mention({ + dataSource: userData, + showMentionChar: true, + requireLeadingSpace : false +}); +mentionObj.appendTo('#mentionElement'); + + diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/index.ts b/ej2-javascript/code-snippet/mention/getting-started-cs13/index.ts new file mode 100644 index 000000000..fa4ba2dae --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/index.ts @@ -0,0 +1,27 @@ +import { Mention } from '@syncfusion/ej2-dropdowns'; + +// defined the array of complex data +let emailData: { [key: string]: Object }[] = [ + { Name: 'Selma Rose', EmailId : 'selma@gmail.com' }, + { Name: 'Maria', EmailId : 'maria@gmail.com' }, + { Name: 'Russo kay', EmailId : 'russo@gmail.com' }, + { Name: 'Robert', EmailId : 'robert@gmail.com' }, + { Name: 'Garth', EmailId : 'garth@gmail.com' } +]; + +// initialize Mention control +let mentionObject: Mention = new Mention({ + //set the data to dataSource property + dataSource: emailData, + // maps the appropriate column to fields property + fields: { text: 'Name', value: 'EmailId' }, + mentionChar: '@', + showMentionChar: true, + requireLeadingSpace : false +}); + +// render initialized Mention +mentionObject.appendTo('#mentionElement'); + + + diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/js/index.html b/ej2-javascript/code-snippet/mention/getting-started-cs13/js/index.html new file mode 100644 index 000000000..3ce6c742d --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/js/index.html @@ -0,0 +1,32 @@ + + Essential JS 2 Mention + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + \ No newline at end of file diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/styles.css b/ej2-javascript/code-snippet/mention/getting-started-cs13/styles.css new file mode 100644 index 000000000..a2b083f54 --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/styles.css @@ -0,0 +1,12 @@ +#container { + visibility: hidden; +} + +#loader { + color: #008cff; + height: 40px; + width: 30%; + position: absolute; + top: 45%; + left: 45%; +} diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/systemjs.config.js b/ej2-javascript/code-snippet/mention/getting-started-cs13/systemjs.config.js new file mode 100644 index 000000000..697ff7aee --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/systemjs.config.js @@ -0,0 +1,34 @@ +System.config({ + transpiler: "typescript", + typescriptOptions: { + compilerOptions: { + target: "umd", + module: "commonjs", + moduleResolution: "node", + emitDecoratorMetadata: true, + experimentalDecorators: true + } + }, + paths: { + "syncfusion:": "https://cdn.syncfusion.com/ej2/20.3.56/" + }, + map: { + main: "index.ts", + typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js", + "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", + "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", + "@syncfusion/ej2-data":"syncfusion:ej2-data/dist/ej2-data.umd.min.js", + "@syncfusion/ej2-inputs":"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", + "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", + "@syncfusion/ej2-lists":"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", + "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", + "@syncfusion/ej2-navigations":"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", + "@syncfusion/ej2-dropdowns":"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", + "@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js" + } +}); + +System.import('index.ts').catch(console.error.bind(console)).then(function () { + document.getElementById('loader').style.display = "none"; + document.getElementById('container').style.visibility = "visible"; +}); \ No newline at end of file diff --git a/ej2-javascript/code-snippet/mention/getting-started-cs13/ts/index.html b/ej2-javascript/code-snippet/mention/getting-started-cs13/ts/index.html new file mode 100644 index 000000000..c981bd5ec --- /dev/null +++ b/ej2-javascript/code-snippet/mention/getting-started-cs13/ts/index.html @@ -0,0 +1,27 @@ + + + + + Essential JS 2 Mention + + + + + + + + + + + + + +
LOADING....
+
+ + +
+
+ + + \ No newline at end of file diff --git a/ej2-javascript/datepicker/date-format.md b/ej2-javascript/datepicker/date-format.md index bb19dc971..0f1f8cddd 100644 --- a/ej2-javascript/datepicker/date-format.md +++ b/ej2-javascript/datepicker/date-format.md @@ -47,3 +47,40 @@ The following example demonstrates the DatePicker with the custom format (`yyyy- {% previewsample "page.domainurl/code-snippet/datepicker/getting-started-cs2" %} {% endif %} + +## Input formats + +Input format allows users to enter dates in various formats in the DatePicker control, providing flexibility in date entry. + +The string format of the date value specifies how the date should be represented as a string when entered by the user. When the user types the date in the input format, it will be automatically converted to the display format after pressing enter, tab key, or when the input loses focus. This enhances the user experience by allowing intuitive data entry through various custom input formats. By default, the DatePicker's format is based on the culture. You can also set the own custom format by using the [`format`](../api/datepicker/#format) property. + +To know more about the date format standards, refer to the [Internationalization Date Format](https://ej2.syncfusion.com/documentation/common/internationalization) section. + +The following example demonstrates the DatePicker with multiple input formats. + +{% if page.publishingplatform == "typescript" %} + + {% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/datepicker/getting-started-cs15/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/datepicker/getting-started-cs15/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/datepicker/getting-started-cs15" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/datepicker/getting-started-cs15/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/datepicker/getting-started-cs15/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/datepicker/getting-started-cs15" %} +{% endif %} diff --git a/ej2-javascript/datetimepicker/date-time-format.md b/ej2-javascript/datetimepicker/date-time-format.md index af951cc3c..137f3cd9e 100644 --- a/ej2-javascript/datetimepicker/date-time-format.md +++ b/ej2-javascript/datetimepicker/date-time-format.md @@ -46,4 +46,41 @@ The following example demonstrates the DateTimePicker with the custom format (`y {% endtabs %} {% previewsample "page.domainurl/code-snippet/datetimepicker/getting-started-cs3" %} -{% endif %} \ No newline at end of file +{% endif %} + +## Input formats + +Input format allows users to enter dates in various formats in the DateTimePicker control, providing flexibility in date entry. + +The string format of the date and time value specifies how the date and time should be represented as a string when entered by the user. When the user types the date and time in the input format, it will be automatically converted to the display format after pressing enter, tab key, or when the input loses focus. This enhances the user experience by allowing intuitive data entry through various custom input formats. You can also set the own custom format by using the [`format`](../api/datetimepicker#format) property. + +To know more about the date format standards, refer to the [Internationalization Date Time Format](http://ej2.syncfusion.com/documentation/base/internationalization/) section. + +The following example demonstrates the DateTimePicker with multiple input formats. + +{% if page.publishingplatform == "typescript" %} + + {% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/datetimepicker/getting-started-cs13/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/datetimepicker/getting-started-cs13/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/datetimepicker/getting-started-cs13" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/datetimepicker/getting-started-cs13/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/datetimepicker/getting-started-cs13/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/datetimepicker/getting-started-cs13" %} +{% endif %} diff --git a/ej2-javascript/mention/customization.md b/ej2-javascript/mention/customization.md index aa317daa5..46cab4ff8 100644 --- a/ej2-javascript/mention/customization.md +++ b/ej2-javascript/mention/customization.md @@ -111,3 +111,38 @@ By default, the popup list width value is set as `auto`. Depending on the mentio You can customize the trigger character by using the [mentionChar](../api/mention/#mentionchar) property in the Mention control. The trigger character triggers the suggestion list to display in the target area. By default, the [mentionChar](../api/mention/#mentionchar) is `@`. + +## Leading Space Requirement + +The [requireLeadingSpace](../api/mention/#mentionchar) property in Mention controls whether a space is needed before triggering the Mention suggestion popup. + +When set to `false`, the mention can be activated without a preceding space. When set to `true` (default), a space is required before the mention character to activate suggestions. + +{% if page.publishingplatform == "typescript" %} + + {% tabs %} +{% highlight ts tabtitle="index.ts" %} +{% include code-snippet/mention/getting-started-cs13/index.ts %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/mention/getting-started-cs13/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/mention/getting-started-cs13" %} + +{% elsif page.publishingplatform == "javascript" %} + +{% tabs %} +{% highlight js tabtitle="index.js" %} +{% include code-snippet/mention/getting-started-cs13/index.js %} +{% endhighlight %} +{% highlight html tabtitle="index.html" %} +{% include code-snippet/mention/getting-started-cs13/index.html %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "page.domainurl/code-snippet/mention/getting-started-cs13" %} +{% endif %} + +![Leading Space Requirement](./images/required_leading_space.gif) \ No newline at end of file diff --git a/ej2-javascript/mention/images/required_leading_space.gif b/ej2-javascript/mention/images/required_leading_space.gif new file mode 100644 index 000000000..99faa1246 Binary files /dev/null and b/ej2-javascript/mention/images/required_leading_space.gif differ