Login Register

DateTextbox

DateTextBox value convert to ISO String

I want to convert the value taken from a DateTextBox into an ISO String using the following function.

var date = dojo.date.stamp.toISOString(dijit.byId('widgetID').attr('value'));
console.debug(date);

The debug message says that the date is NULL. If I do the same with a created Javascript Date object it works fine.

var date = dojo.date.stamp.toISOString(new Date());
console.debug(date);

The debug message shows a date string. I've also tried using the dojo locale format function and it also has the same behavior.

programmatically updating a DateTextBox using attr()

Seasons' Greetings all,

I'm fairly new to Dojo, using release 1.2.2 on my website's page:

http://www.purplelizardgallery.com/gato.jsp

DateTextBox Style in portlet

Hi,

I'm developing a JPS portlet and I'm using DOJO in it, everything works except for the look of the DateTextbox, it appears as a frid of numbers without any style in it.

Because I'm making a portlet I don't have a "body" tag to set the class to any theme, I have define the class directly insto some divs like this;

<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" style="width:500px;height:160px" class="soria">

And that gave the tabs the style I wanted but nothing happens with the DateTextbox.

Any suggestions?

Thanks

DateTextBox and ValidationTextBox height: 2 rows. Why?

We've just upgraded to a custom build of dojo 1.2.1 and my DateTextBox's and my ValidationTextBox's are 2 rows tall instead of the one row they were before.

The html is:

input dojoType="dijit.form.DateTextBox"
       id="myDate"
       name="my[Date]"
       type="text"
       value="2008-12-18" 
       style="width: 6em;"

and


input dojoType="dijit.form.ValidationTextBox"
id="my_text"
invalidMessage="Format: ###-###-####, where # is between 0 and 9." name="my[text]"
regExp="."
required="true"
size="30"

Setting value for DateTextBox

Hi All
I'm getting crazy with DateTextBox... i want to set it's value using js... after searching a lot i have to use javascript Date object to set value
but when i try that.. value get set but with month increased by one
for example:
new Date(2008,8,8)

DateTextBox value become 2008/9/8

please help

DateTextBox focus automatically scrolls to the top of the browser?

I have a DateTextBox widget nested in a custom widget. When I focus in on the DateTextBox it automatically scrolls to the top of the browser if it's not already there. what's up with that?

For example:

http://dinh.gomen.org/dojo-release-1.2.2-src/skejuo/tests/test_Skejuo.html

Normal behavior: click on the first "Date" link.
Weird behavior: click on the last "Date" link

What's up with that? I'm not sure what's making it scroll to the top of the page. How do I stop that weird behavior?

Inline Edit Date Textbox

Hi
can anyone help with following:

I am trying a simple script and get the message:

[Exception... "'Error: Bundle not found: validate in dijit.form , locale=en-us' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "" data: no]
http://appdev.transfargo.se/test/js/dojo/dojo/dojo.js
Line 16

Here is my script:

InlineEdit Date Demo

@import "js/dojo/dojo/resources/dojo.css";

DateTextBox in Dojo1.1

To use the new BorderContainer I have to load dojo 1.1 and when I do the DateTextBox in TabContainer/ContentPane displays on two lines in FF and in IE/7 it displays only the right and left border. I believe I tried everything but failed.

Problems with DateTextBox and Initial Values

I have a page that has four date fields on it that use the DateTextBox widget. I'm having trouble passing an initial value.

This doesn't work:

<input name="deliveryDate" id="deliveryDate"
    type="text" dojoType="dijit.form.DateTextBox"
    style="width:90px;" value="10/02/2008">

This does work:

<input name="deliveryDate" id="deliveryDate"
    type="text" dojoType="dijit.form.DateTextBox"
    style="width:90px;" value="2008-10-02">

DateTextBox onChange fires when date has not changed

I have a DateTextBox on my form. I dojo.connect to onChange but every time the calendar widget goes away onChange is fired for the text box whether the date has actually changed or not.

I did some digging and it looks like the following line from _open in _DateTimeTextBox.js is the reason.

dijit.form._DateTimeTextBox.superclass.setValue.call(textBox, value, true);

Should a check be done before setting the textBox value?
Something like
if( value != textBox.getValue() ){ dijit.form._DateTimeTextBox.superclass.setValue.call(textBox, value, true); }?

Syndicate content