jQWidgets Forums
Forum Replies Created
-
Author
-
March 19, 2013 at 12:01 pm in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17468
hi thank you soo much, i have achieved this with following code,
updaterow: function (rowid, rowdata, commit) {
// synchronize with the server – send update command
var oldV = oldvalue;
var newV = args.value;
if(args.columntype == ‘datetimeinput’){
var oldDate =oldV.getDate() +””+ oldV.getMonth() +””+ oldV.getFullYear();
var newDate =newV.getDate() +””+ newV.getMonth() +””+ newV.getFullYear();
oldV = oldDate;
newV = newDate;
}
if(oldV != newV){
if(confirm(“Do you really want to change the data?”)){
commit(true);}
else commit(false);
}
else commit(false);
}Thanks,
AkshathaMarch 19, 2013 at 10:06 am in reply to: Hide the default validation error "Entered value is not valid" Hide the default validation error "Entered value is not valid" #17446Thank you,
if i use cellvaluechanging function again updaterow:function is called, which i don want, can i use any other function which will not call updaterow:function{} ie which returns false; similar to validation but no error mgThanks
AkshathaMarch 19, 2013 at 4:56 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17374is der any other function which helps to meet my requirement. ????
thanks,
AkshathaMarch 18, 2013 at 12:49 pm in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17304Dimitar, if i return oldV value also, im getting “entered value is not valid” error which is really not acceptable and it forces to edit the date.
i’m using jqwidgets2.5.5 libthanks,
Akshatha jMarch 18, 2013 at 12:42 pm in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17303Can you tel me if there are any alternate function i can use to achieve my requirement (thinking u understood my requirement) other than validation:function.
Thanks,
AkshathaMarch 18, 2013 at 12:33 pm in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17301Dimitar i dont want any alert when date is not modified, its should not call any function. Because when i edit other column it will throw alert oly if i change the data. please help me with this, m running out with time given. please do help me
thanks,
AkshathaMarch 18, 2013 at 12:01 pm in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17295But when i dint changed date, it is showing “Entered value is not valid” error. How to overcome with this??
Thanks,
AkshathaMarch 18, 2013 at 11:51 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17293Thank you soo much Dimitar, it worked with small change in assigning oldV ie oldV=cellvalue;,
initeditor: function (row, cellvalue, editor) {
oldV =cellvalue; //
},
validation: function (cell, value) {
var newV = value;
var oldDate = oldV.getDate();
var newDate = newV.getDate();
var oldMonth = oldV.getMonth();
var newMonth = newV.getMonth();
var oldYear = oldV.getFullYear();
var newYear = newV.getFullYear();
alert(“”+oldDate+oldMonth+oldYear+”,”+newDate+newMonth+newYear);
if ((oldDate == newDate) && (oldMonth == newMonth) && (oldYear == newYear)) {
return { result: false, message:”date dint changed” };
}
return true;but last question, after if condition i want to return false with no error message, because when i get this error it forces to edit date means it will not let other column to edit.
thanks,
AkshathaMarch 18, 2013 at 11:26 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17289And when i did alert(“”+oldV+”,”+newV);, i found that oldV and newV are similar when i changed date. Please help me out
Thanks,
Akshatha JMarch 18, 2013 at 11:22 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17288im really sorry Dimitar, i’m getting alert when i dint changed date also.
this is my updaterow funnction,updaterow: function (rowid, rowdata, commit) {
// synchronize with the server – send update command
if(confirm(“Do you really want to change the data?”)){
commit(true);
}
else {
commit(false);
}
}{text: ‘SettlementDate’, datafield: ‘SettlementDate’, columntype: ‘datetimeinput’, cellsformat: ‘yyyy-MM-dd’,
initeditor: function (row, cellvalue, editor) {
var oldV = editor.jqxDateTimeInput(‘getDate’);
},
validation: function (cell, value) {
var newV = value;
var oldDate = oldV.getDate();
var newDate = newV.getDate();
var oldMonth = oldV.getMonth();
var newMonth = newV.getMonth();
var oldYear = oldV.getFullYear();
var newYear = newV.getFullYear();
if ((oldDate != newDate) || (oldMonth != newMonth) || (oldYear != newYear)) {
return { result: false, message:”date changed” };
}return true;
}
}Thanks,
Akshatha jMarch 18, 2013 at 10:35 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17284thank you,
It is showing same error “Date dint changed” for both changing date and not changing it, plss help me outif ((oldDate != newDate) || (oldMonth != newMonth) || (oldYear != newYear)) {
return { result: false, message: “Date changed.” };
};if ((oldDate == newDate) || (oldMonth== newMonth) || (oldYear == newYear)) {
return { result: false, message: “Date dint changed.” };
};Thanks,
AkshathaMarch 18, 2013 at 8:50 am in reply to: Alert only when date changes (Im not interested in time here) Alert only when date changes (Im not interested in time here) #17273Thanks for your reply, as this is UI all data coming dynamically. here im posting piece of code which may help you to understand,
column = [{text: ‘ID’, datafield: ‘InvestmentId’, editable: false },
{text: ‘AccountNumber’, datafield: ‘AccountNumber’, width: 130, cellclassname: ‘text_to_uppercase’ },
{text: ‘Amount’, datafield: ‘Amount’ },
{text: ‘SettlementDate’, datafield: ‘SettlementDate’, columntype: ‘datetimeinput’, cellsformat: ‘yyyy-MM-dd’,
validation: function (cell, value) {
if (value== ”) {
return { result: false, message: “SettlementDate cannot be empty!” };
}
return true;
}
}];from here updaterow function is called where alert will come, it is not possible to store previous values to compare.. please help me out… m hitting my head to solve ths small issue from 2days.
Thanks,
AKSHATHA -
AuthorPosts