RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.

disable()

Disable the widget on the page.

Parameters

Returns

None

get_timeZoneKendo()

Returns the Kendo Dropdown list related to the widget.

Parameters

get_fetchValue()

Returns UTC time 

Parameters

Returns

String

required()

Enables or disables client side required on the widget

Parameters

Boolean 

Returns

None

remove_valueChanged()

Removes any delegate hooked up to the add_valueChanged() event.

Parameters

Function

Returns

None

get_type()

Returns the widget type

Parameters

None

Returns

String

get_zoneSelector()

Returns the Time zone selector when its enabled.

Parameters

Returns

jQuery Object

get_displayInput()

Returns the DateTime display associated with the widget.

Parameters

None

Returns

JQuery Object

enable()

Enable the widget on the page.

Parameters

Returns

None

clear()

Returns the widget type

Parameters

Returns

None

add_valueChanged()

Fired when the value of the widget is changed by the user. 

The event handler function context (Available via the this keyword) will be set to the widget instance.

Parameters

Function

Returns

None

get_model()

Returns the model object ​of the widget, which contains a number of useful properties related to the widget.

In the case of the CRM DateTime widget, these returned properties and their types are:

  • BlackoutDates: Array
  • BlackoutWeekends: Boolean
  • DateTimeFormat: String
  • InputMode: Integer
  • MaxDate. String
  • MinDate: String
  • ReadOnly: Boolean

Example-DateTime Fetch Model

tpc.forms[0].TpcDateTime.get_model();
Parameters

None

Returns

Object

get_kendoInput()

Returns the kendo datetimepicker object associated with the widget.

Example-DateTime Fetch Kendo Input

tpc.forms[0].TpcDateTime.get_kendoInput();
Parameters

None

get_input()

Returns the HTML element associated with the widget.     

Example-Fetch DateTime Input Element

tpc.forms[0].TpcDateTime.get_input();
Parameters

None

Returns

​JQuery Object

get_element()

Returns the HTML input element associated with the widget.

Example-Fetch DateTime Element

tpc.forms[0].TpcDateTime.get_element();
Parameters

None

Returns

​JQuery Object

get_container()

Returns the container element associated with the widget.

Example-Fetching the DateTime Widgets' Container Element

tpc.forms[0].TpcDateTime.get_container();
Parameters

None

Returns

​JQuery Object

hide()

Hides the field.

Example-Hiding the CRM DateTime Widget

tpc.forms[0].TpcDateTime.hide();
Parameters

None

Returns

None

show()

Shows the field.

Example-Showing the CRM DateTime Widget

tpc.forms[0].TpcDateTime.show();
Parameters

None

Returns

None

set_value()

Sets the value of the DateTime widget.

There are a number of ways to set the value of a DateTime widget.

Example-Setting the value of a DateTime widget.

tpc.forms[0].TpcDateTime.set_value(new Date("March 5 2015"));
Parameters

DateTime Object

Returns

None

toggle()

toggles the visibility of the widget. ​

Example-EXAMPLE-DateTime TOGGLE

tpc.forms[0].Tpc​Datetime.toggle()
Parameters

None

Returns

None     

readonly()

 set the widget state to read only

Example- DateTime- READONLY

//set to true
tpc.forms[0].TpcDateTime.readonly(true);

//set to false
tpc.forms[0].TpcDateTime.readonly(false);

//show the read only status
tpc.forms[0].TpcDateTime.readonly();
Parameters

true, false

Returns

None