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()

Disables the widget on the form.

Example-Disable DateTime

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

None

Returns

None

get_timeZoneKendo()

Returns the Kendo DropDownList Object related to the widget.

Example-DateTime Fetch DropDownList

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

None

Returns

Kendo Object: kendo.ui.DropDownList

get_fetchValue()

Returns UTC time.

Example-DateTime Fetch Fetch Value

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

None

Returns

String

required()

Enables or disables client side required on the widget.

Example-DateTime Required

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

Boolean 

Returns

None

get_value()

Returns the value of the widget.

Example-DATETIME FETCH VALUE

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

None

Returns

String

remove_valueChanged()

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

Example-DateTime Remove ValueChanged Binding

//For example, using:
var a = tpc.forms[0].TpcDateTime.add_valueChanged(function()

console.log( this.get_value()); 
});
//will output the selected value of the widget to the console as soon as the value changes. All delegates must be set with a variable. This way you can easily remove this delegate from any widget by using:
tpc.forms[0].TpcDateTime.remove_valueChanged(a);
Parameters

Function

Returns

None

get_type()

Returns the widget type.

Example-DateTime Fetch Type

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

None

Returns

String

get_zoneSelector()

Returns the time zone selector when it is enabled.

Example-DateTime Fetch ZoneSelector

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

None

Returns

jQuery Object

get_displayInput()

Returns the DateTime display associated with the widget.

Example-DateTime Fetch Display

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

None

Returns

jQuery Object

enable()

Enables the widget on the form.

Example-Enable DateTime

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

None

Returns

None

clear()

Clears the value of the widget.

Example-Clear DateTime

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

None

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.

Example-DateTime ADD VALUECHANGED BINDING

//For example, using:
var a = tpc.forms[0].TpcDateTime.add_valueChanged(function()

console.log( this.get_value()); 
});
//will output the selected value of the widget to the console as soon as the value changes. All delegates must be set with a variable.
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 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

Returns

Kendo Object: Kendo.ui.DateTimePicker

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 Widget's Container Element

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

None

Returns

jQuery Object

hide()

Hides the widget from the form.

Example-HIDE DATETIME

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

None

Returns

None

show()

Shows the widget on the form.

Example-SHOW DATETIME

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

None

Returns

None

set_value()

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

Example-DATETIME SET VALUE

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

DateTime Object

Returns

None

toggle()

Toggles the visibility of the widget.

Example-DATETIME TOGGLE

tpc.forms[0].TpcDatetime.toggle()
Parameters

None

Returns

None     

readonly()

Sets 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